Created
December 31, 2024 22:10
-
-
Save juddey/d6c82c4e319a3dc27c7b4d62ff2894c6 to your computer and use it in GitHub Desktop.
Formatted Medusa
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"version": "2.0.0", | |
"title": "Medusa Storefront API", | |
"license": { | |
"name": "MIT", | |
"url": "https://github.com/medusajs/medusa/blob/master/LICENSE" | |
} | |
}, | |
"servers": [ | |
{ | |
"url": "http://localhost:9000" | |
}, | |
{ | |
"url": "https://api.medusajs.com" | |
} | |
], | |
"tags": [ | |
{ | |
"name": "Auth", | |
"description": "Auth API routes allow you to manage a customer's authentication.\n" | |
}, | |
{ | |
"name": "Carts", | |
"description": "A cart is a virtual shopping bag that customers can use to add items they want to purchase.\n\nA cart is then used to checkout and place an order.\n\nThese API routes allow customers to create and manage their cart, and place an order.\n", | |
"externalDocs": { | |
"description": "How to implement cart functionality in a storefront.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/cart" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreCart" | |
} | |
}, | |
{ | |
"name": "Collections", | |
"description": "A product collection organizes products into a collection for marketing purposes. For example, a summer collection.\n\nThese API routes allow customers to browse collections and their products.\n", | |
"externalDocs": { | |
"description": "How to list product collections in a storefront.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreCollection" | |
} | |
}, | |
{ | |
"name": "Currencies", | |
"description": "A store has multiple currencies, and product prices can be different for each currency.\n\nWhen retrieving product variant prices, you specify either the ID of a region or a currency that the customer selected.\n\nThese API routes allow customers to browse currencies.\n", | |
"externalDocs": { | |
"description": "How to retrieve product variant prices in a storefront.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/price" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreCurrency" | |
} | |
}, | |
{ | |
"name": "Customers", | |
"description": "Customers can place orders as guest customers or register.\n\nWhen a customer registers, they can manage their profile, save addresses for later usage, and more.\n\nThese API routes allow customers to create and manage their accounts.\n", | |
"externalDocs": { | |
"description": "How to implement customer account functionalities in a storefront.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreCustomer" | |
} | |
}, | |
{ | |
"name": "Orders", | |
"description": "Guest and registered customers can view orders they placed.\n\nThese API routes allow customers to view their orders.\n", | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreOrder" | |
} | |
}, | |
{ | |
"name": "Payment Collections", | |
"description": "A cart must have a payment collection with an authorized payment session.\n\nUse these API routes during checkout to set the cart's payment provider and authorize its payment session.\n", | |
"externalDocs": { | |
"description": "How to implement payment during checkout.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StorePaymentCollection" | |
} | |
}, | |
{ | |
"name": "Payment Providers", | |
"description": "Each region has a set of payment providers enabled.\n\nDuring checkout, you retrieve the available payment providers in the customer's region to show them to the customer. Customers then choose their preferred provider to authorize their payment and place their order.\n\nThese API routes allow customers to view available payment providers in their region.\n", | |
"externalDocs": { | |
"description": "How to implement payment during checkout.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StorePaymentProvider" | |
} | |
}, | |
{ | |
"name": "Product Categories", | |
"description": "Products can be categorized into categories.\n\nThese API routes allow customers to browse categories and their products.\n", | |
"externalDocs": { | |
"description": "How to list product categories in a storefront.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreProductCategory" | |
} | |
}, | |
{ | |
"name": "Products", | |
"description": "Customers browse products for their purchase.\n\nA product has variants for different option values. The customer chooses from these variants before adding it to the cart.\n\nThese API routes allow customers to browse products.\n", | |
"externalDocs": { | |
"description": "How to list products, get their prices, and more in a storefront.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreProduct" | |
} | |
}, | |
{ | |
"name": "Regions", | |
"description": "Regions are different countries or geographical regions that the commerce store serves customers in.\n\nCustomers can choose what region they're in to view prices of that region's currency.\n\nUse these API routes to retrieve available regions in the store.\n", | |
"externalDocs": { | |
"description": "How to retrieve and store selected region in a storefront.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/regions" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreRegion" | |
} | |
}, | |
{ | |
"name": "Return", | |
"description": "Customers can request to return items in their order. The admin user then receives and handles the return.\n\nThese API routes allows customers to create a return.\n", | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreReturn" | |
} | |
}, | |
{ | |
"name": "Return Reasons", | |
"description": "A return reason is a possible reason a customer wants to return an item.\n\nUse these API routes when implementing return creation flow in your storefront to allow customers to select their return reason.\n", | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreReturnReason" | |
} | |
}, | |
{ | |
"name": "Shipping Options", | |
"description": "A shipping option is a way of shipping an item to or from the customer.\n\nDuring the checkout flow, the customer selects their preferred shipping option to receive their order.\n\nThese API routes allow customers to retrieve available shipping options for their context.\n", | |
"externalDocs": { | |
"description": "How to implement shipping during checkout.", | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping" | |
}, | |
"x-associatedSchema": { | |
"$ref": "#/components/schemas/StoreShippingOption" | |
} | |
} | |
], | |
"paths": { | |
"/auth/customer/{auth_provider}": { | |
"post": { | |
"operationId": "PostActor_typeAuth_provider", | |
"summary": "Authenticate Customer", | |
"description": "Authenticate a customer and receive the JWT token to be used in the header of subsequent requests.\n\nWhen used with a third-party provider, such as Google, the request returns a `location` property. You redirect to the specified URL in your storefront to continue authentication with the third-party service.\n", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/storefront-development/customers/login#1-using-a-jwt-token", | |
"description": "Storefront development: How to login as a customer" | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "auth_provider", | |
"in": "path", | |
"description": "The provider used for authentication.", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"example": "emailpass" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"title": "input", | |
"description": "The input data necessary for authentication. For example, for email-pass authentication, pass `email` and `password` properties." | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "EmailPass Provider", | |
"source": "curl -X POST '{backend_url}/auth/customer/emailpass' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"email\": \"[email protected]\",\n \"password\": \"supersecret\"\n}'" | |
}, | |
{ | |
"lang": "Bash", | |
"label": "Google Provider", | |
"source": "curl -X POST '{backend_url}/auth/customer/google'" | |
} | |
], | |
"tags": [ | |
"Auth" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"oneOf": [ | |
{ | |
"$ref": "#/components/schemas/AuthResponse" | |
}, | |
{ | |
"$ref": "#/components/schemas/AuthCallbackResponse" | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/auth/customer/{auth_provider}/callback": { | |
"post": { | |
"operationId": "PostActor_typeAuth_providerCallback", | |
"summary": "Validate Authentication Callback", | |
"description": "This API route is used by your storefront or frontend application when a third-party provider redirects to it after authentication. \n\nIt validates the authentication with the third-party provider and, if successful, returns an authentication token.\n\nYou can decode the JWT token using libraries like [react-jwt](https://www.npmjs.com/package/react-jwt) in the storefront. If the decoded data doesn't have an `actor_id` property, then you must register the customer using the Create Customer API route passing the token in the request's Authorization header.\n", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/storefront-development/customers/third-party-login", | |
"description": "Storefront development: Implement third-party (social) login." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "auth_provider", | |
"in": "path", | |
"description": "The provider used for authentication.", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"example": "google" | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "Google Provider", | |
"source": "curl -X POST '{backend_url}/auth/customer/google/callback?code=123'" | |
}, | |
{ | |
"lang": "Bash", | |
"label": "GitHub Provider", | |
"source": "curl -X POST '{backend_url}/auth/customer/github/callback?code=123'" | |
} | |
], | |
"tags": [ | |
"Auth" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/AuthResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/auth/customer/{auth_provider}/register": { | |
"post": { | |
"operationId": "PostActor_typeAuth_provider_register", | |
"summary": "Retrieve Registration JWT Token", | |
"description": "This API route retrieves a registration JWT token of a customer that hasn't been registered yet. The token is used in the header of requests that create a customer.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/storefront-development/customers/register", | |
"description": "Storefront development: How to register a customer" | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "auth_provider", | |
"in": "path", | |
"description": "The provider used for authentication.", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"example": "emailpass" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"title": "input", | |
"description": "The input data necessary for authentication. For example, for email-pass authentication, pass `email` and `password` properties.", | |
"example": { | |
"email": "[email protected]", | |
"password": "supersecret" | |
} | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/auth/customer/emailpass/register' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"email\": \"[email protected]\",\n \"password\": \"supersecret\"\n}'" | |
} | |
], | |
"tags": [ | |
"Auth" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/AuthResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/auth/customer/{auth_provider}/reset-password": { | |
"post": { | |
"operationId": "PostActor_typeAuth_providerResetPassword", | |
"summary": "Generate Reset Password Token for Customer", | |
"x-sidebar-summary": "Generate Reset Password Token", | |
"description": "Generate a reset password token for a customer. This API route emits the `auth.password_reset` event, passing it the token as a payload. You can listen to that event and send the user a notification. The notification should have a URL that accepts a `token` query parameter.\n\n\n Use the generated token to update the user's password using the Reset Password API route.\n", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password#1-request-reset-password-page", | |
"description": "Storefront development: How to create the request reset password page." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "auth_provider", | |
"in": "path", | |
"description": "The provider used for authentication.", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"example": "emailpass" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"title": "identifier", | |
"description": "The customer's identifier for the selected auth provider. For example, for the `emailpass` auth provider, the value is the customer's email.", | |
"example": "[email protected]" | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/auth/customer/emailpass/reset-password' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"identifier\": \"[email protected]\"\n}'" | |
} | |
], | |
"tags": [ | |
"Auth" | |
], | |
"responses": { | |
"201": { | |
"description": "OK" | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "generateResetPasswordTokenWorkflow" | |
} | |
}, | |
"/auth/customer/{auth_provider}/update": { | |
"post": { | |
"operationId": "PostActor_typeAuth_providerUpdate", | |
"summary": "Reset a Customer's Password", | |
"x-sidebar-summary": "Reset Password", | |
"description": "Reset a customer's password. Generate the reset password token first using the Get Reset Password Token API route.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password#2-reset-password-page", | |
"description": "Storefront development: How to create the reset password page." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "auth_provider", | |
"in": "path", | |
"description": "The provider used for authentication.", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"example": "emailpass" | |
} | |
}, | |
{ | |
"name": "token", | |
"in": "query", | |
"description": "The reset password token received using the Get Reset Password API route.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"title": "input", | |
"description": "The input data necessary for authentication with the specified auth provider. For example, for email-pass authentication, pass `email` and `password` properties.", | |
"example": { | |
"email": "[email protected]", | |
"password": "supersecret" | |
} | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/auth/customer/emailpass/update?token=123' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n \"email\": \"[email protected]\",\n \"password\": \"supersecret\"\n}'" | |
} | |
], | |
"tags": [ | |
"Auth" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"required": [ | |
"success" | |
], | |
"description": "Details on the reset password's status.", | |
"properties": { | |
"success": { | |
"type": "boolean", | |
"title": "success", | |
"description": "Whether the password was reset successfully." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/auth/session": { | |
"post": { | |
"operationId": "PostSession", | |
"summary": "Set Authentication Session", | |
"description": "Set the cookie session ID of a customer. The customer must be previously authenticated with the `/auth/customer/{provider}` API route first, as the JWT token is required in the header of the request.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/storefront-development/customers/login#2-using-a-cookie-session", | |
"description": "Storefront development: How to login as a customer" | |
}, | |
"x-authenticated": true, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/auth/session' \\\n-H 'Authorization: Bearer {jwt_token}'" | |
} | |
], | |
"tags": [ | |
"Auth" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/AuthStoreSessionResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
}, | |
"delete": { | |
"operationId": "DeleteSession", | |
"summary": "Delete Authentication Session", | |
"description": "Deletes the cookie session ID previously set for authentication.", | |
"x-authenticated": true, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X DELETE '{backend_url}/auth/session' \\\n-H 'Cookie: connect.sid={sid}'" | |
} | |
], | |
"tags": [ | |
"Auth" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"description": "The deletion's details.", | |
"required": [ | |
"success" | |
], | |
"properties": { | |
"success": { | |
"type": "boolean", | |
"title": "success", | |
"description": "Whether the session was deleted successfully." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/auth/token/refresh": { | |
"post": { | |
"operationId": "PostAdminAuthTokenRefresh", | |
"summary": "Refresh Authentication Token", | |
"description": "Refresh the authentication token of a customer. This is useful after authenticating a customer with a third-party service to ensure the token holds the new user's details, or when you don't want customers to re-login every day.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/storefront-development/customers/third-party-login", | |
"description": "Storefront development: Implement third-party (social) login." | |
}, | |
"x-authenticated": true, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/auth/token/refresh' \\\n-H 'Authorization: Bearer {token}'" | |
} | |
], | |
"tags": [ | |
"Auth" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/AuthResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/carts": { | |
"post": { | |
"operationId": "PostCarts", | |
"summary": "Create Cart", | |
"description": "Create a cart.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"$ref": "#/components/schemas/StoreCreateCart" | |
}, | |
{ | |
"type": "object", | |
"description": "The cart's details.", | |
"properties": { | |
"additional_data": { | |
"type": "object", | |
"description": "Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter." | |
} | |
} | |
} | |
], | |
"description": "The cart's details." | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/carts' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCartResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "createCartWorkflow" | |
} | |
}, | |
"/store/carts/{id}": { | |
"get": { | |
"operationId": "GetCartsId", | |
"summary": "Get a Cart", | |
"description": "Retrieve a cart by its ID. You can expand the cart's relations or select the fields that should be returned.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/carts/{id}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCartResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
}, | |
"post": { | |
"operationId": "PostCartsId", | |
"summary": "Update a Cart", | |
"description": "Update a cart's details. This unsets the shipping an payment methods chosen before, and the customer would have to choose them again.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"$ref": "#/components/schemas/UpdateCartData" | |
}, | |
{ | |
"type": "object", | |
"description": "The properties to update in the cart item.", | |
"properties": { | |
"additional_data": { | |
"type": "object", | |
"description": "Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter." | |
} | |
} | |
} | |
], | |
"description": "The properties to update in the cart item." | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/carts/{id}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"description": "The updated cart's details.", | |
"required": [ | |
"cart" | |
], | |
"properties": { | |
"cart": { | |
"$ref": "#/components/schemas/StoreCart" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "updateCartWorkflow" | |
} | |
}, | |
"/store/carts/{id}/complete": { | |
"post": { | |
"operationId": "PostCartsIdComplete", | |
"summary": "Complete Cart", | |
"description": "Complete a cart and place an order.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/complete-cart", | |
"description": "Storefront guide: How to implement cart completion during checkout." | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/carts/{id}/complete' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "object", | |
"description": "The created order's details.", | |
"required": [ | |
"type", | |
"order" | |
], | |
"properties": { | |
"type": { | |
"type": "string", | |
"title": "type", | |
"description": "The type of the returned object. In this case, the order is returned because the cart was completed successfully.", | |
"default": "order" | |
}, | |
"order": { | |
"$ref": "#/components/schemas/StoreOrder" | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The details of why the cart completion failed.", | |
"required": [ | |
"type", | |
"cart", | |
"error" | |
], | |
"properties": { | |
"type": { | |
"type": "string", | |
"title": "type", | |
"description": "The type of the returned object. In this case, the cart is returned because an error has occurred.", | |
"default": "cart" | |
}, | |
"cart": { | |
"$ref": "#/components/schemas/StoreCart" | |
}, | |
"error": { | |
"type": "object", | |
"description": "The error's details.", | |
"required": [ | |
"message", | |
"name", | |
"type" | |
], | |
"properties": { | |
"message": { | |
"type": "string", | |
"title": "message", | |
"description": "The error's message." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The error's name." | |
}, | |
"type": { | |
"type": "string", | |
"title": "type", | |
"description": "The error's type. Can be a [MedusaError type](https://docs.medusajs.com/v2/advanced-development/api-routes/errors#medusaerror-types) or `payment_authorization_error` or `payment_requires_more_error` for payment-related errors.\n" | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "completeCartWorkflow" | |
} | |
}, | |
"/store/carts/{id}/line-items": { | |
"post": { | |
"operationId": "PostCartsIdLineItems", | |
"summary": "Add Line Item to Cart", | |
"x-sidebar-summary": "Add Line Item", | |
"description": "Add a product variant as a line item in the cart.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#add-product-variant-to-cart", | |
"description": "Storefront guide: How to add a product variant to the cart." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreAddCartLineItem" | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/carts/{id}/line-items' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"variant_id\": \"{value}\",\n \"quantity\": 3360689747918848,\n \"metadata\": {}\n}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCartResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "addToCartWorkflow" | |
} | |
}, | |
"/store/carts/{id}/line-items/{line_id}": { | |
"post": { | |
"operationId": "PostCartsIdLineItemsLine_id", | |
"summary": "Update a Line Item in a Cart", | |
"x-sidebar-summary": "Update Line Item", | |
"description": "Update a line item's details in the cart.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#update-line-item-in-cart", | |
"description": "Storefront guide: How to update a cart's line item." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "line_id", | |
"in": "path", | |
"description": "The line item's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreUpdateCartLineItem" | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"quantity\": 8980402259623936,\n \"metadata\": {}\n}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCartResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "updateLineItemInCartWorkflow" | |
}, | |
"delete": { | |
"operationId": "DeleteCartsIdLineItemsLine_id", | |
"summary": "Remove Line Item from Cart", | |
"x-sidebar-summary": "Remove Line Item", | |
"description": "Remove a line item from a cart.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#remove-line-item-from-cart", | |
"description": "Storefront guide: How to remove line item from cart." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "line_id", | |
"in": "path", | |
"description": "The line item's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The deletion's details.", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The ID of the deleted line item." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "line-item" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the item was deleted." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The deletion's details.", | |
"properties": { | |
"parent": { | |
"$ref": "#/components/schemas/StoreCart", | |
"description": "The cart that the item belonged to." | |
} | |
} | |
} | |
], | |
"description": "The deletion's details." | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "deleteLineItemsWorkflow" | |
} | |
}, | |
"/store/carts/{id}/promotions": { | |
"post": { | |
"operationId": "PostCartsIdPromotions", | |
"summary": "Add Promotions to Cart", | |
"x-sidebar-summary": "Add Promotions", | |
"description": "Add a list of promotions to a cart.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"description": "The promotion's details.", | |
"required": [ | |
"promo_codes" | |
], | |
"properties": { | |
"promo_codes": { | |
"type": "array", | |
"description": "Promotion codes to add to the cart.", | |
"items": { | |
"type": "string", | |
"title": "promo_codes", | |
"description": "A promotion code." | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/carts/{id}/promotions' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"promo_codes\": [\n \"{value}\"\n ]\n}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCartResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "updateCartPromotionsWorkflow" | |
}, | |
"delete": { | |
"operationId": "DeleteCartsIdPromotions", | |
"summary": "Remove Promotions from Cart", | |
"description": "Remove a list of promotions from a cart.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X DELETE '{backend_url}/store/carts/{id}/promotions' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"description": "The cart's details.", | |
"required": [ | |
"cart" | |
], | |
"properties": { | |
"cart": { | |
"$ref": "#/components/schemas/StoreCart" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "updateCartPromotionsWorkflow" | |
} | |
}, | |
"/store/carts/{id}/shipping-methods": { | |
"post": { | |
"operationId": "PostCartsIdShippingMethods", | |
"summary": "Add Shipping Method to Cart", | |
"x-sidebar-summary": "Add Shipping Method", | |
"description": "Add a shipping method to a cart. Use this API route when the customer chooses their preferred shipping option.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping", | |
"description": "Storefront guide: How to implement shipping during checkout." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"description": "The shipping method's details.", | |
"required": [ | |
"option_id" | |
], | |
"properties": { | |
"option_id": { | |
"type": "string", | |
"title": "option_id", | |
"description": "The ID of the shipping option this method is created from." | |
}, | |
"data": { | |
"type": "object", | |
"description": "Any additional data relevant for the third-party fulfillment provider to process the shipment.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter", | |
"description": "Learn more about the data parameter." | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/carts/{id}/shipping-methods' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"option_id\": \"{value}\"\n}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCartResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "addShippingMethodToCartWorkflow" | |
} | |
}, | |
"/store/carts/{id}/taxes": { | |
"post": { | |
"operationId": "PostCartsIdTaxes", | |
"summary": "Calculate Cart Taxes", | |
"x-sidebar-summary": "Calculate Taxes", | |
"description": "Calculate the cart's tax lines and amounts.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The cart's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/carts/{id}/taxes' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Carts" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCartResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "updateTaxLinesWorkflow" | |
} | |
}, | |
"/store/collections": { | |
"get": { | |
"operationId": "GetCollections", | |
"summary": "List Collections", | |
"description": "Retrieve a list of collections. The collections can be filtered by fields such as `handle`. The collections can also be sorted or paginated.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list", | |
"description": "Storefront guide: How to retrieve a list of collections." | |
}, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "title", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "title", | |
"description": "Filter by a collection's title." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by collection titles.", | |
"items": { | |
"type": "string", | |
"title": "title", | |
"description": "A title." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "created_at", | |
"in": "query", | |
"description": "Filter by the collection's creation date.", | |
"required": false, | |
"schema": { | |
"type": "object", | |
"description": "Filter by the collection's creation date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "An exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value not to match." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "The value to match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not matching this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value to not match" | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter" | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The value to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching those in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The values to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
}, | |
{ | |
"name": "updated_at", | |
"in": "query", | |
"description": "Filter by the collection's update date.", | |
"required": false, | |
"schema": { | |
"type": "object", | |
"description": "Filter by the collection's update date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "An exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value not to match." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "The value to match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not matching this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value to not match" | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter" | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The value to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching those in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The values to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
}, | |
{ | |
"name": "handle", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "handle", | |
"description": "Filter by a collection's handle." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by collection handles.", | |
"items": { | |
"type": "string", | |
"title": "handle", | |
"description": "A handle." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "q", | |
"in": "query", | |
"description": "Search term to filter the collection's searchable properties.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "q", | |
"description": "Search term to filter the collection's searchable properties." | |
} | |
}, | |
{ | |
"name": "$and", | |
"in": "query", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
} | |
}, | |
{ | |
"name": "$or", | |
"in": "query", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/collections' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Collections" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The paginated list of collections.", | |
"required": [ | |
"limit", | |
"offset", | |
"count" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The paginated list of collections.", | |
"required": [ | |
"collections" | |
], | |
"properties": { | |
"collections": { | |
"type": "array", | |
"description": "The collection's collections.", | |
"items": { | |
"$ref": "#/components/schemas/StoreCollection" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/collections/{id}": { | |
"get": { | |
"operationId": "GetCollectionsId", | |
"summary": "Get a Collection", | |
"description": "Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/collections/retrieve", | |
"description": "Storefront guide: How to retrieve a collection." | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The collection's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/collections/{id}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Collections" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCollectionResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/currencies": { | |
"get": { | |
"operationId": "GetCurrencies", | |
"summary": "List Currencies", | |
"description": "Retrieve a list of currencies. The currencies can be filtered by fields such as `code`. The currencies can also be sorted or paginated.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "q", | |
"in": "query", | |
"description": "Search term to filter the currency's searchable properties.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "q", | |
"description": "Search term to filter the currency's searchable properties." | |
} | |
}, | |
{ | |
"name": "code", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "code", | |
"description": "Filter by a currency code." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by currency codes.", | |
"items": { | |
"type": "string", | |
"title": "code", | |
"description": "A currency code." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "$and", | |
"in": "query", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
} | |
}, | |
{ | |
"name": "$or", | |
"in": "query", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/currencies' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Currencies" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCurrencyListResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/currencies/{code}": { | |
"get": { | |
"operationId": "GetCurrenciesCode", | |
"summary": "Get a Currency", | |
"description": "Retrieve a currency by its code. You can expand the currency's relations or select the fields that should be returned.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "code", | |
"in": "path", | |
"description": "The currency's code.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/currencies/{code}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Currencies" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCurrencyResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/customers": { | |
"post": { | |
"operationId": "PostCustomers", | |
"summary": "Register Customer", | |
"description": "Register a customer. Use the `/auth/customer/emailpass/register` API route first to retrieve the registration token and pass it in the header of the request.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/register", | |
"description": "Storefront guide: How to register a customer." | |
}, | |
"x-authenticated": true, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCreateCustomer" | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/customers' \\\n-H 'Authorization: Bearer {token}' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"email\": \"[email protected]\",\n \"company_name\": \"{value}\",\n \"first_name\": \"{value}\",\n \"last_name\": \"{value}\",\n \"phone\": \"{value}\"\n}'" | |
} | |
], | |
"tags": [ | |
"Customers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCustomerResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "createCustomerAccountWorkflow", | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
] | |
} | |
}, | |
"/store/customers/me": { | |
"get": { | |
"operationId": "GetCustomersMe", | |
"summary": "Get Logged-in Customer", | |
"x-sidebar-summary": "Get Customer", | |
"description": "Retrieve the logged-in customer. You can expand the customer's relations or select the fields that should be returned.", | |
"x-authenticated": true, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/retrieve", | |
"description": "Storefront guide: How to retrieve the logged-in customer." | |
}, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/customers/me' \\\n-H 'Authorization: Bearer {access_token}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Customers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCustomerResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
}, | |
"post": { | |
"operationId": "PostCustomersMe", | |
"summary": "Update Customer", | |
"description": "Update the logged-in customer's details.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/profile", | |
"description": "Storefront guide: How to edit a customer's profile." | |
}, | |
"x-authenticated": true, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreUpdateCustomer" | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/customers/me' \\\n-H 'Authorization: Bearer {access_token}' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"company_name\": \"{value}\",\n \"first_name\": \"{value}\",\n \"last_name\": \"{value}\",\n \"phone\": \"{value}\"\n}'" | |
} | |
], | |
"tags": [ | |
"Customers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCustomerResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "updateCustomersWorkflow" | |
} | |
}, | |
"/store/customers/me/addresses": { | |
"get": { | |
"operationId": "GetCustomersMeAddresses", | |
"summary": "List Customer's Addresses", | |
"x-sidebary-summary": "List Addresses", | |
"description": "Retrieve the addresses of the logged-in customer. The addresses can be filtered by fields such as `country_code`. The addresses can also be sorted or paginated.", | |
"x-authenticated": true, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#list-customer-addresses", | |
"description": "Storefront guide: How to retrieve the logged-in customer's addresses." | |
}, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "city", | |
"in": "query", | |
"description": "Filter by the address's city.", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "city", | |
"description": "Filter by a city." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by cities.", | |
"items": { | |
"type": "string", | |
"title": "city", | |
"description": "A city." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "postal_code", | |
"in": "query", | |
"description": "Filter by the address's postal code.", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "postal_code", | |
"description": "Filter by a postal code." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by postal codes.", | |
"items": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "A postal code." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "country_code", | |
"in": "query", | |
"description": "Filter by the address's country code.", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "country_code", | |
"description": "Filter by a country code." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by country codes.", | |
"items": { | |
"type": "string", | |
"title": "country_code", | |
"description": "A country code." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "q", | |
"in": "query", | |
"description": "Search term to filter the address's searchable properties.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "q", | |
"description": "Search term to filter the address's searchable properties." | |
} | |
} | |
], | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/customers/me/addresses' \\\n-H 'Authorization: Bearer {access_token}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Customers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCustomerAddressListResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
}, | |
"post": { | |
"operationId": "PostCustomersMeAddresses", | |
"summary": "Create Address for Logged-In Customer", | |
"x-sidebar-summary": "Create Address", | |
"description": "Create an address for the logged-in customer.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#add-customer-address", | |
"description": "Storefront guide: How to create an address for the logged-in customer." | |
}, | |
"x-authenticated": true, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"description": "The address's details.", | |
"properties": { | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The customer's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The customer's last name." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The customer's phone." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code." | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"address_name": { | |
"type": "string", | |
"title": "address_name", | |
"description": "The address's name." | |
}, | |
"is_default_shipping": { | |
"type": "boolean", | |
"title": "is_default_shipping", | |
"description": "Whether the address is used by default for shipping during checkout." | |
}, | |
"is_default_billing": { | |
"type": "boolean", | |
"title": "is_default_billing", | |
"description": "Whether the address is used by default for billing during checkout." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "Holds custom key-value pairs." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/customers/me/addresses' \\\n-H 'Authorization: Bearer {access_token}' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"metadata\": {},\n \"first_name\": \"{value}\",\n \"last_name\": \"{value}\",\n \"phone\": \"{value}\",\n \"company\": \"{value}\",\n \"address_1\": \"{value}\",\n \"address_2\": \"{value}\",\n \"city\": \"{value}\",\n \"country_code\": \"{value}\",\n \"province\": \"{value}\",\n \"postal_code\": \"{value}\",\n \"address_name\": \"{value}\"\n}'" | |
} | |
], | |
"tags": [ | |
"Customers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCustomerResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "createCustomerAddressesWorkflow" | |
} | |
}, | |
"/store/customers/me/addresses/{address_id}": { | |
"get": { | |
"operationId": "GetCustomersMeAddressesAddress_id", | |
"summary": "Get Customer's Address", | |
"x-sidebar-summary": "Get Address", | |
"description": "Retrieve an address of the logged-in customer. You can expand the address's relations or select the fields that should be returned.", | |
"x-authenticated": true, | |
"parameters": [ | |
{ | |
"name": "address_id", | |
"in": "path", | |
"description": "The address's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/customers/me/addresses/{address_id}' \\\n-H 'Authorization: Bearer {access_token}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Customers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCustomerAddressResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
}, | |
"post": { | |
"operationId": "PostCustomersMeAddressesAddress_id", | |
"summary": "Update Customer's Address", | |
"x-sidebar-summary": "Update Address", | |
"description": "Update the logged-in customer's address.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#edit-an-address", | |
"description": "Storefront guide: How to update an address of the logged-in customer." | |
}, | |
"x-authenticated": true, | |
"parameters": [ | |
{ | |
"name": "address_id", | |
"in": "path", | |
"description": "The address's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"description": "The properties to update in the address.", | |
"properties": { | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The customer's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The customer's last name." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The customer's phone." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code." | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"address_name": { | |
"type": "string", | |
"title": "address_name", | |
"description": "The address's name." | |
}, | |
"is_default_shipping": { | |
"type": "boolean", | |
"title": "is_default_shipping", | |
"description": "Whether the address is used by default for shipping during checkout." | |
}, | |
"is_default_billing": { | |
"type": "boolean", | |
"title": "is_default_billing", | |
"description": "Whether the address is used by default for billing during checkout." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "Holds custom key-value pairs." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' \\\n-H 'Authorization: Bearer {access_token}' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"first_name\": \"{value}\",\n}'" | |
} | |
], | |
"tags": [ | |
"Customers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCustomerResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "updateCustomerAddressesWorkflow" | |
}, | |
"delete": { | |
"operationId": "DeleteCustomersMeAddressesAddress_id", | |
"summary": "Remove Customer's Address", | |
"x-sidebar-summary": "Remove Address", | |
"description": "Remove an address of the logged-in customer.", | |
"x-authenticated": true, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#delete-customer-address", | |
"description": "Storefront guide: How to delete a customer's address." | |
}, | |
"parameters": [ | |
{ | |
"name": "address_id", | |
"in": "path", | |
"description": "The address's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n-H 'Authorization: Bearer {access_token}'" | |
} | |
], | |
"tags": [ | |
"Customers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The deletion's details.", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The address's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "address" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the address was deleted." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The deletion's details.", | |
"properties": { | |
"parent": { | |
"$ref": "#/components/schemas/StoreCustomer", | |
"description": "The details of the customer the address belongs to." | |
} | |
} | |
} | |
], | |
"description": "The deletion's details." | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "deleteCustomerAddressesWorkflow" | |
} | |
}, | |
"/store/orders": { | |
"get": { | |
"operationId": "GetOrders", | |
"summary": "List Logged-in Customer's Orders", | |
"x-sidebar-summary": "List Orders", | |
"description": "Retrieve the orders of the logged-in customer. The orders can be filtered by fields such as `id`. The orders can also be sorted or paginated.", | |
"x-authenticated": true, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "id", | |
"description": "Filter by an order ID." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by order IDs.", | |
"items": { | |
"type": "string", | |
"title": "id", | |
"description": "An order ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "$and", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "The order's $and.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
} | |
}, | |
{ | |
"name": "$or", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "The order's $or.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
} | |
}, | |
{ | |
"name": "status", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "status", | |
"description": "The order's status." | |
}, | |
{ | |
"type": "string", | |
"title": "status", | |
"description": "The order's status." | |
}, | |
{ | |
"type": "string", | |
"title": "status", | |
"description": "The order's status." | |
}, | |
{ | |
"type": "string", | |
"title": "status", | |
"description": "The order's status." | |
}, | |
{ | |
"type": "string", | |
"title": "status", | |
"description": "The order's status." | |
}, | |
{ | |
"type": "string", | |
"title": "status", | |
"description": "The order's status." | |
}, | |
{ | |
"type": "array", | |
"description": "The order's status.", | |
"items": { | |
"type": "string", | |
"description": "The status's details.", | |
"enum": [ | |
"canceled", | |
"requires_action", | |
"pending", | |
"completed", | |
"draft", | |
"archived" | |
] | |
} | |
} | |
] | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/orders' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Orders" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The paginated list of orders.", | |
"required": [ | |
"limit", | |
"offset", | |
"count" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The paginated list of orders.", | |
"required": [ | |
"orders" | |
], | |
"properties": { | |
"orders": { | |
"type": "array", | |
"description": "The order's orders.", | |
"items": { | |
"$ref": "#/components/schemas/StoreOrder" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"security": [ | |
{ | |
"cookie_auth": [] | |
}, | |
{ | |
"jwt_token": [] | |
} | |
], | |
"x-workflow": "getOrdersListWorkflow" | |
} | |
}, | |
"/store/orders/{id}": { | |
"get": { | |
"operationId": "GetOrdersId", | |
"summary": "Get an Order", | |
"description": "Retrieve an order by its ID. You can expand the order's relations or select the fields that should be returned.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The order's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/orders/{id}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Orders" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreOrderResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "getOrderDetailWorkflow" | |
} | |
}, | |
"/store/payment-collections": { | |
"post": { | |
"operationId": "PostPaymentCollections", | |
"summary": "Create Payment Collection", | |
"description": "Create a payment collection for a cart. This is used during checkout, where the payment collection holds the cart's payment sessions.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment", | |
"description": "Storefront guide: How to implement payment during checkout." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCreatePaymentCollection" | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/payment-collections' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"cart_id\": \"{value}\",\n \"region_id\": \"{value}\",\n \"currency_code\": \"{value}\",\n \"amount\": 8468325826822144\n}'" | |
} | |
], | |
"tags": [ | |
"Payment Collections" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StorePaymentCollectionResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "createPaymentCollectionForCartWorkflow" | |
} | |
}, | |
"/store/payment-collections/{id}/payment-sessions": { | |
"post": { | |
"operationId": "PostPaymentCollectionsIdPaymentSessions", | |
"summary": "Initialize Payment Session of a Payment Collection", | |
"x-sidebar-summary": "Initialize Payment Session", | |
"description": "Initialize and add a payment session to a payment collection. This is used during checkout, where you create a payment collection for the cart, then initialize a payment session for the payment provider that the customer chooses.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment", | |
"description": "Storefront guide: How to implement payment during checkout." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The payment collection's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreInitializePaymentSession" | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/payment-collections/{id}/payment-sessions' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"provider_id\": \"{value}\"\n}'" | |
} | |
], | |
"tags": [ | |
"Payment Collections" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StorePaymentCollectionResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "createPaymentSessionsWorkflow" | |
} | |
}, | |
"/store/payment-providers": { | |
"get": { | |
"operationId": "GetPaymentProviders", | |
"summary": "List Payment Providers", | |
"description": "Retrieve a list of payment providers. You must provide the `region_id` query parameter to retrieve the payment providers enabled in that region.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment", | |
"description": "Storefront guide: How to implement payment during checkout." | |
}, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "region_id", | |
"in": "query", | |
"description": "Filter by a region ID to get the payment providers enabled in that region.", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"title": "region_id", | |
"description": "Filter by a region ID." | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/payment-providers' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Payment Providers" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The list of payment providers.", | |
"required": [ | |
"limit", | |
"offset", | |
"count" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The list of payment providers.", | |
"required": [ | |
"payment_providers" | |
], | |
"properties": { | |
"payment_providers": { | |
"type": "array", | |
"description": "The list of payment providers.", | |
"items": { | |
"$ref": "#/components/schemas/StorePaymentProvider" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/product-categories": { | |
"get": { | |
"operationId": "GetProductCategories", | |
"summary": "List Product Categories", | |
"description": "Retrieve a list of product categories. The product categories can be filtered by fields such as `id`. The product categories can also be sorted or paginated.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list", | |
"description": "Storefront guide: How to retrieve a list of product categories." | |
}, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "q", | |
"in": "query", | |
"description": "Search term to filter the product category's properties.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "q", | |
"description": "Search term to filter the product category's properties." | |
} | |
}, | |
{ | |
"name": "id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "id", | |
"description": "Filter by a product category's ID." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by product category IDs.", | |
"items": { | |
"type": "string", | |
"title": "id", | |
"description": "A product category ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "description", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "description", | |
"description": "Filter by a description. This only matches categories with the exact description. To search by a term or keyword, use the `q` query parameter instead." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by descriptions. This only matches categories that have one of the provided descriptions. To search by a term or keyword, use the `q` query parameter instead.", | |
"items": { | |
"type": "string", | |
"title": "description", | |
"description": "A description." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "handle", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "handle", | |
"description": "Filter by a category's handle." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by category handles.", | |
"items": { | |
"type": "string", | |
"title": "handle", | |
"description": "A handle." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "parent_category_id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "parent_category_id", | |
"description": "The ID of a category to retrieve its child categories." | |
}, | |
{ | |
"type": "array", | |
"description": "The ID of categories to retrieve their child categories.", | |
"items": { | |
"type": "string", | |
"title": "parent_category_id", | |
"description": "A product category's ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "include_ancestors_tree", | |
"in": "query", | |
"description": "Whether to retrieve the category's parent. When enabled, the parent category is set in the `parent_category` property.", | |
"required": false, | |
"schema": { | |
"type": "boolean", | |
"title": "include_ancestors_tree", | |
"description": "Whether to retrieve the category's parent. When enabled, the parent category is set in the `parent_category` property." | |
} | |
}, | |
{ | |
"name": "include_descendants_tree", | |
"in": "query", | |
"description": "Whether to retrieve a list of child categories. When enabled, the parent categories are added to the `category_children` property.", | |
"required": false, | |
"schema": { | |
"type": "boolean", | |
"title": "include_descendants_tree", | |
"description": "Whether to retrieve a list of child categories. When enabled, the parent categories are added to the `category_children` property." | |
} | |
}, | |
{ | |
"name": "created_at", | |
"in": "query", | |
"description": "Filter by the category's creation date.", | |
"required": false, | |
"schema": { | |
"type": "object", | |
"description": "Filter by the category's creation date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "An exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value not to match." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "The value to match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not matching this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value to not match" | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter" | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The value to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching those in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The values to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
}, | |
{ | |
"name": "updated_at", | |
"in": "query", | |
"description": "Filter by the category's update date.", | |
"required": false, | |
"schema": { | |
"type": "object", | |
"description": "Filter by the category's update date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "An exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value not to match." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "The value to match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not matching this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value to not match" | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter" | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The value to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching those in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The values to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
}, | |
{ | |
"name": "$and", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
} | |
}, | |
{ | |
"name": "$or", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "The product category's $or.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
} | |
}, | |
{ | |
"name": "name", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "name", | |
"description": "Filter by a product category name." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by product category names.", | |
"items": { | |
"type": "string", | |
"title": "name", | |
"description": "A product category name." | |
} | |
} | |
] | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/product-categories' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Product Categories" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreProductCategoryListResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/product-categories/{id}": { | |
"get": { | |
"operationId": "GetProductCategoriesId", | |
"summary": "Get a Product Category", | |
"description": "Retrieve a product category by its ID. You can expand the product category's relations or select the fields that should be returned.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/categories/retrieve", | |
"description": "Storefront guide: How to retrieve a product category." | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The product category's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "include_ancestors_tree", | |
"in": "query", | |
"description": "Whether to retrieve the category's parent. When enabled, the parent category is set in the `parent_category` property.", | |
"required": false, | |
"schema": { | |
"type": "boolean", | |
"title": "include_ancestors_tree", | |
"description": "Whether to retrieve the category's parent. When enabled, the parent category is set in the `parent_category` property." | |
} | |
}, | |
{ | |
"name": "include_descendants_tree", | |
"in": "query", | |
"description": "Whether to retrieve a list of child categories. When enabled, the parent categories are added to the `category_children` property.", | |
"required": false, | |
"schema": { | |
"type": "boolean", | |
"title": "include_descendants_tree", | |
"description": "Whether to retrieve a list of child categories. When enabled, the parent categories are added to the `category_children` property." | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/product-categories/{id}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Product Categories" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreProductCategoryResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/products": { | |
"get": { | |
"operationId": "GetProducts", | |
"summary": "List Products", | |
"description": "Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/price", | |
"description": "Storefront guide: How to retrieve a product variants' prices." | |
}, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "$and", | |
"in": "query", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
} | |
}, | |
{ | |
"name": "$or", | |
"in": "query", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
} | |
}, | |
{ | |
"name": "q", | |
"in": "query", | |
"description": "Search term to filter the product's searchable properties.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "q", | |
"description": "Search term to filter the product's searchable properties." | |
} | |
}, | |
{ | |
"name": "id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "id", | |
"description": "Filter by a product ID." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by product IDs.", | |
"items": { | |
"type": "string", | |
"title": "id", | |
"description": "A product ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "title", | |
"in": "query", | |
"description": "Filter by product titles.", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "title", | |
"description": "Filter by a title." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by titles.", | |
"items": { | |
"type": "string", | |
"title": "title", | |
"description": "A title." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "handle", | |
"in": "query", | |
"description": "Filter by product handles.", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "handle", | |
"description": "Filter by a product handle." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by product handles.", | |
"items": { | |
"type": "string", | |
"title": "handle", | |
"description": "A product handle." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "is_giftcard", | |
"in": "query", | |
"description": "Whether the product is a gift card.", | |
"required": false, | |
"schema": { | |
"type": "boolean", | |
"title": "is_giftcard", | |
"description": "Whether the product is a gift card." | |
} | |
}, | |
{ | |
"name": "collection_id", | |
"in": "query", | |
"description": "Filter by a collection's ID to retrieve the products in it.", | |
"required": false, | |
"schema": { | |
"description": "Filter by a collection's ID to retrieve the products in it.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/collections/products", | |
"description": "Storefront guide: Retrieve a collection's products." | |
}, | |
"items": { | |
"type": "string", | |
"title": "collection_id", | |
"description": "A collection's ID." | |
} | |
} | |
}, | |
{ | |
"name": "tag_id", | |
"in": "query", | |
"description": "Filter by a tag's ID to retrieve the products in it.", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "tag_id", | |
"description": "Filter by a product tag's ID." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by product tag IDs.", | |
"items": { | |
"type": "string", | |
"title": "tag_id", | |
"description": "A product tag ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "type_id", | |
"in": "query", | |
"description": "Filter by a type's ID to retrieve the products in it.", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "type_id", | |
"description": "Filter by a product type's ID." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by product type IDs.", | |
"items": { | |
"type": "string", | |
"title": "type_id", | |
"description": "A product type ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "created_at", | |
"in": "query", | |
"description": "Filter by the product's creation date.", | |
"required": false, | |
"schema": { | |
"type": "object", | |
"description": "Filter by the product's creation date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "An exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value not to match." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "The value to match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not matching this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value to not match" | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter" | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The value to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching those in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The values to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
}, | |
{ | |
"name": "updated_at", | |
"in": "query", | |
"description": "Filter by the product's update date.", | |
"required": false, | |
"schema": { | |
"type": "object", | |
"description": "Filter by the product's update date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "An exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value not to match." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by multiple exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "The value to match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not matching this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "The value to match." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "The value to not match" | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching this parameter" | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The value to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching those in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "The values to not match." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "The values to match." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "The values to match." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "The values to match." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
}, | |
{ | |
"name": "region_id", | |
"in": "query", | |
"description": "The ID of the region the products are being viewed from. This is required if you're retrieving product variant prices with taxes.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of the region the products are being viewed from. This is required if you're retrieving product variant prices with taxes.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/price/examples/tax-price", | |
"description": "Storefront guide: How to show product variants' prices with taxes." | |
} | |
} | |
}, | |
{ | |
"name": "province", | |
"in": "query", | |
"description": "The province the products are being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "province", | |
"description": "The province the products are being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes." | |
} | |
}, | |
{ | |
"name": "sales_channel_id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "sales_channel_id", | |
"description": "The ID of a sales channel to retrieve products in it." | |
}, | |
{ | |
"type": "array", | |
"description": "The IDs of sales channels to retrieve products in them.", | |
"items": { | |
"type": "string", | |
"title": "sales_channel_id", | |
"description": "A sales channel's ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "category_id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "category_id", | |
"description": "The ID of a product category to retrieve products in it." | |
}, | |
{ | |
"type": "array", | |
"description": "The ID of product categories to retrieve products in them.", | |
"items": { | |
"type": "string", | |
"title": "category_id", | |
"description": "A product category's ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "currency_code", | |
"in": "query", | |
"description": "The currency code to retrieve prices in.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The currency code to retrieve prices in." | |
} | |
}, | |
{ | |
"name": "variants", | |
"in": "query", | |
"description": "Filter the products' variants.", | |
"required": false, | |
"schema": { | |
"type": "object", | |
"description": "Filter the products' variants.", | |
"x-schemaName": "StoreProductVariantParams", | |
"properties": { | |
"options": { | |
"type": "object", | |
"description": "Filter by the variants' options.", | |
"required": [ | |
"value", | |
"option_id" | |
], | |
"properties": { | |
"option_id": { | |
"type": "string", | |
"title": "option_id", | |
"description": "The ID of the option to filter by." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "Filter by a value of the option." | |
} | |
} | |
} | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/products' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Products" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The paginated list of products.", | |
"required": [ | |
"limit", | |
"offset", | |
"count" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The paginated list of products.", | |
"required": [ | |
"products" | |
], | |
"properties": { | |
"products": { | |
"type": "array", | |
"description": "The list of products.", | |
"items": { | |
"type": "object" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/products/{id}": { | |
"get": { | |
"operationId": "GetProductsId", | |
"summary": "Get a Product", | |
"description": "Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/price", | |
"description": "Storefront guide: How to retrieve a product variants' prices." | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The product's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "region_id", | |
"in": "query", | |
"description": "The ID of the region the product is being viewed from. This is required if you're retrieving product variant prices with taxes.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of the region the product is being viewed from. This is required if you're retrieving product variant prices with taxes.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/products/price/examples/tax-price", | |
"description": "Storefront guide: How to show product variants' prices with taxes." | |
} | |
} | |
}, | |
{ | |
"name": "country_code", | |
"in": "query", | |
"description": "The country code the product is being viewed from. This is required if you're retrieving product variant prices with taxes.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The country code the product is being viewed from. This is required if you're retrieving product variant prices with taxes." | |
} | |
}, | |
{ | |
"name": "province", | |
"in": "query", | |
"description": "The province the product is being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "province", | |
"description": "The province the product is being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes." | |
} | |
}, | |
{ | |
"name": "cart_id", | |
"in": "query", | |
"description": "The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "cart_id", | |
"description": "The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties." | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/products/{id}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Products" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreProductResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/regions": { | |
"get": { | |
"operationId": "GetRegions", | |
"summary": "List Regions", | |
"description": "Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated.", | |
"x-authenticated": false, | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/regions/list", | |
"description": "Storefront guide: How to retrieve a list of regions." | |
}, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "q", | |
"in": "query", | |
"description": "Search term to filter the region's searchable properties.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "q", | |
"description": "Search term to filter the region's searchable properties." | |
} | |
}, | |
{ | |
"name": "id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "id", | |
"description": "Filter by a region's ID." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by region IDs.", | |
"items": { | |
"type": "string", | |
"title": "id", | |
"description": "A region's ID." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "name", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "name", | |
"description": "Filter by a region name." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by region names.", | |
"items": { | |
"type": "string", | |
"title": "name", | |
"description": "A region's name." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "currency_code", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "currency_code", | |
"description": "Filter by a currency code to retrieve regions that use that code." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by currency codes to retrieve regions that use one of these codes.", | |
"items": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "A currency code." | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "$and", | |
"in": "query", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
} | |
}, | |
{ | |
"name": "$or", | |
"in": "query", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/regions' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Regions" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The paginated list of regions.", | |
"required": [ | |
"limit", | |
"offset", | |
"count" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The paginated list of regions.", | |
"required": [ | |
"regions" | |
], | |
"properties": { | |
"regions": { | |
"type": "array", | |
"description": "The list of regions.", | |
"items": { | |
"$ref": "#/components/schemas/StoreRegion" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/regions/{id}": { | |
"get": { | |
"operationId": "GetRegionsId", | |
"summary": "Get a Region", | |
"description": "Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The region's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/regions/{id}'" | |
} | |
], | |
"tags": [ | |
"Regions" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"description": "The region's details.", | |
"required": [ | |
"region" | |
], | |
"properties": { | |
"region": { | |
"$ref": "#/components/schemas/StoreRegion" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/return": { | |
"post": { | |
"operationId": "PostReturn", | |
"summary": "Create Return", | |
"description": "Create a return for an order's items. The admin receives the return and process it from their side.", | |
"x-authenticated": false, | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreCreateReturn" | |
} | |
} | |
} | |
}, | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl -X POST '{backend_url}/store/return' \\\n-H 'Content-Type: application/json' \\ \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'\n--data-raw '{\n \"order_id\": \"{value}\",\n \"items\": [\n {\n \"id\": \"id_XbfptxUVo2io9EI\",\n \"quantity\": 7916429753974784,\n \"reason_id\": \"{value}\",\n \"note\": \"{value}\"\n }\n ],\n \"return_shipping\": {\n \"option_id\": \"{value}\",\n \"price\": 1068364080349184\n },\n \"note\": \"{value}\",\n \"location_id\": \"{value}\"\n}'" | |
} | |
], | |
"tags": [ | |
"Return" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreReturnResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "createAndCompleteReturnOrderWorkflow" | |
} | |
}, | |
"/store/return-reasons": { | |
"get": { | |
"operationId": "GetReturnReasons", | |
"summary": "List Return Reasons", | |
"description": "Retrieve a list of return reasons. The return reasons can be sorted or paginated.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/return-reasons' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Return Reasons" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The paginated list of return reasons.", | |
"required": [ | |
"limit", | |
"offset", | |
"count" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The paginated list of return reasons.", | |
"required": [ | |
"return_reasons" | |
], | |
"properties": { | |
"return_reasons": { | |
"type": "array", | |
"description": "The list of return reasons.", | |
"items": { | |
"$ref": "#/components/schemas/StoreReturnReason" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/return-reasons/{id}": { | |
"get": { | |
"operationId": "GetReturnReasonsId", | |
"summary": "Get a Return Reason", | |
"description": "Retrieve a return reason by its ID. You can expand the return reason's relations or select the fields that should be returned.", | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The return reason's ID.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/return-reasons/{id}' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Return Reasons" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreReturnReasonResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
} | |
} | |
}, | |
"/store/shipping-options": { | |
"get": { | |
"operationId": "GetShippingOptions", | |
"summary": "List Shipping Options for Cart", | |
"description": "Retrieve a list of shipping options for a cart. The cart's ID is set in the required `cart_id` query parameter.\n\nThe shipping options also be sorted or paginated.\n", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping", | |
"description": "Storefront guide: How to implement shipping during checkout." | |
}, | |
"x-authenticated": false, | |
"parameters": [ | |
{ | |
"name": "fields", | |
"in": "query", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "fields", | |
"description": "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.", | |
"externalDocs": { | |
"url": "#select-fields-and-relations" | |
} | |
} | |
}, | |
{ | |
"name": "offset", | |
"in": "query", | |
"description": "The number of items to skip when retrieving a list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items to skip when retrieving a list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "Limit the number of items returned in the list.", | |
"required": false, | |
"schema": { | |
"type": "number", | |
"title": "limit", | |
"description": "Limit the number of items returned in the list.", | |
"externalDocs": { | |
"url": "#pagination" | |
} | |
} | |
}, | |
{ | |
"name": "order", | |
"in": "query", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "order", | |
"description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`." | |
} | |
}, | |
{ | |
"name": "cart_id", | |
"in": "query", | |
"description": "The ID of the cart to retrieve its shipping options.", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"title": "cart_id", | |
"description": "The ID of the cart to retrieve its shipping options." | |
} | |
}, | |
{ | |
"name": "$and", | |
"in": "query", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
} | |
}, | |
{ | |
"name": "$or", | |
"in": "query", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"required": false, | |
"schema": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
} | |
}, | |
{ | |
"name": "is_return", | |
"in": "query", | |
"description": "Whether the shipping option can be used for returns.", | |
"required": false, | |
"schema": { | |
"type": "boolean", | |
"title": "is_return", | |
"description": "Whether the shipping option can be used for returns." | |
} | |
} | |
], | |
"x-codeSamples": [ | |
{ | |
"lang": "Shell", | |
"label": "cURL", | |
"source": "curl '{backend_url}/store/shipping-options' \\\n-H 'x-publishable-api-key: {your_publishable_api_key}'" | |
} | |
], | |
"tags": [ | |
"Shipping Options" | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StoreShippingOptionListResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/components/responses/400_error" | |
}, | |
"401": { | |
"$ref": "#/components/responses/unauthorized" | |
}, | |
"404": { | |
"$ref": "#/components/responses/not_found_error" | |
}, | |
"409": { | |
"$ref": "#/components/responses/invalid_state_error" | |
}, | |
"422": { | |
"$ref": "#/components/responses/invalid_request_error" | |
}, | |
"500": { | |
"$ref": "#/components/responses/500_error" | |
} | |
}, | |
"x-workflow": "listShippingOptionsForCartWorkflow" | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"AdminApiKey": { | |
"type": "object", | |
"description": "The API key's details.", | |
"x-schemaName": "AdminApiKey", | |
"required": [ | |
"id", | |
"token", | |
"redacted", | |
"title", | |
"type", | |
"last_used_at", | |
"created_by", | |
"created_at", | |
"updated_at", | |
"revoked_by", | |
"revoked_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The api key's ID." | |
}, | |
"token": { | |
"type": "string", | |
"title": "token", | |
"description": "The api key's token." | |
}, | |
"redacted": { | |
"type": "string", | |
"title": "redacted", | |
"description": "The redacted form of the API key's token. This is useful when showing portion of the token.", | |
"example": "sk_...123" | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The api key's title." | |
}, | |
"type": { | |
"type": "string", | |
"description": "The api key's type. `secret` is used for a user's API key, whereas `publishable` is used for Publishable API keys.", | |
"enum": [ | |
"secret", | |
"publishable" | |
] | |
}, | |
"last_used_at": { | |
"type": "string", | |
"title": "last_used_at", | |
"description": "The date and time the API key was last used.", | |
"format": "date-time" | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created the API key, if available." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date and time the API key was created." | |
}, | |
"revoked_by": { | |
"type": "string", | |
"title": "revoked_by", | |
"description": "The ID of the user that revoked the API key, if available." | |
}, | |
"revoked_at": { | |
"type": "string", | |
"title": "revoked_at", | |
"description": "The date and time the API key was revoked. The API key is considered revoked when this property is set.", | |
"format": "date-time" | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the API key was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the API key was deleted." | |
} | |
} | |
}, | |
"AdminApiKeyResponse": { | |
"type": "object", | |
"description": "The API key's details.", | |
"x-schemaName": "AdminApiKeyResponse", | |
"required": [ | |
"api_key" | |
], | |
"properties": { | |
"api_key": { | |
"$ref": "#/components/schemas/AdminApiKey" | |
} | |
} | |
}, | |
"AdminApplicationMethod": { | |
"type": "object", | |
"description": "The application method's details.", | |
"x-schemaName": "AdminApplicationMethod", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"promotion": { | |
"$ref": "#/components/schemas/AdminPromotion" | |
}, | |
"target_rules": { | |
"type": "array", | |
"description": "The application method's target rules.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPromotionRule" | |
} | |
}, | |
"buy_rules": { | |
"type": "array", | |
"description": "The application method's buy rules.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPromotionRule" | |
} | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The application method's ID." | |
}, | |
"type": { | |
"type": "string", | |
"description": "The application method's type. If it's `fixed`, the promotion discounts a fixed amount. If it's `percentage`, the promotion discounts a percentage.", | |
"enum": [ | |
"fixed", | |
"percentage" | |
] | |
}, | |
"target_type": { | |
"type": "string", | |
"description": "Which item does the promotion apply to. `items` mean the promotion applies to the cart's items; `shipping_methods` means the promotion applies to the cart's shipping methods; `order` means the promotion applies on the entire order.", | |
"enum": [ | |
"items", | |
"shipping_methods", | |
"order" | |
] | |
}, | |
"allocation": { | |
"type": "string", | |
"description": "How is the promotion amount discounted. `each` means the discounted amount is applied on each applicable item; `across` means the discounted amount is split accross the applicable items.", | |
"enum": [ | |
"each", | |
"across" | |
] | |
}, | |
"value": { | |
"type": "number", | |
"title": "value", | |
"description": "The amount to be discounted." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The application method's currency code.", | |
"example": "usd" | |
}, | |
"max_quantity": { | |
"type": "number", | |
"title": "max_quantity", | |
"description": "The max quantity allowed in the cart for the associated promotion to be applied." | |
}, | |
"buy_rules_min_quantity": { | |
"type": "number", | |
"title": "buy_rules_min_quantity", | |
"description": "The minimum quantity required for a `buyget` promotion to be applied. For example, if the promotion is a \"Buy 2 shirts get 1 free\", the value of this attribute is `2`." | |
}, | |
"apply_to_quantity": { | |
"type": "number", | |
"title": "apply_to_quantity", | |
"description": "The quantity that results from matching the `buyget` promotion's condition. For example, if the promotion is a \"Buy 2 shirts get 1 free\", the value of this attribute is `1`." | |
} | |
} | |
}, | |
"AdminBatchProductRequest": { | |
"type": "object", | |
"description": "The products to create, update, or delete.", | |
"x-schemaName": "AdminBatchProductRequest", | |
"properties": { | |
"create": { | |
"type": "array", | |
"description": "The products to create.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateProduct" | |
} | |
}, | |
"update": { | |
"type": "array", | |
"description": "The products to update.", | |
"items": { | |
"$ref": "#/components/schemas/AdminUpdateProduct" | |
} | |
}, | |
"delete": { | |
"type": "array", | |
"description": "The products to delete.", | |
"items": { | |
"type": "string", | |
"title": "delete", | |
"description": "A product's ID." | |
} | |
} | |
} | |
}, | |
"AdminBatchProductResponse": { | |
"type": "object", | |
"description": "The details of the products created, updated, or deleted.", | |
"x-schemaName": "AdminBatchProductResponse", | |
"required": [ | |
"created", | |
"updated", | |
"deleted" | |
], | |
"properties": { | |
"created": { | |
"type": "array", | |
"description": "The created products", | |
"items": { | |
"$ref": "#/components/schemas/AdminProduct" | |
} | |
}, | |
"updated": { | |
"type": "array", | |
"description": "The updated products.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProduct" | |
} | |
}, | |
"deleted": { | |
"type": "object", | |
"description": "The deleted products' details.", | |
"required": [ | |
"ids", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"ids": { | |
"type": "array", | |
"description": "The IDs of deleted products.", | |
"items": { | |
"type": "string", | |
"title": "ids", | |
"description": "The ID of a deleted product." | |
} | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted objects.", | |
"default": "product" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the products were deleted." | |
} | |
} | |
} | |
} | |
}, | |
"AdminBatchProductVariantRequest": { | |
"type": "object", | |
"description": "The product variants to create, update, or delete.", | |
"x-schemaName": "AdminBatchProductVariantRequest", | |
"properties": { | |
"create": { | |
"type": "array", | |
"description": "The product variants to create.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateProductVariant" | |
} | |
}, | |
"update": { | |
"type": "array", | |
"description": "The product variants to update.", | |
"items": { | |
"$ref": "#/components/schemas/AdminBatchUpdateProductVariant" | |
} | |
}, | |
"delete": { | |
"type": "array", | |
"description": "The product variants to delete.", | |
"items": { | |
"type": "string", | |
"title": "delete", | |
"description": "A product variant's ID." | |
} | |
} | |
} | |
}, | |
"AdminBatchProductVariantResponse": { | |
"type": "object", | |
"description": "The details of the product variants created, updated, or deleted.", | |
"x-schemaName": "AdminBatchProductVariantResponse", | |
"required": [ | |
"created", | |
"updated", | |
"deleted" | |
], | |
"properties": { | |
"created": { | |
"type": "array", | |
"description": "The created product variants.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductVariant" | |
} | |
}, | |
"updated": { | |
"type": "array", | |
"description": "The updated product variants.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductVariant" | |
} | |
}, | |
"deleted": { | |
"type": "object", | |
"description": "The details of the deleted product variants.", | |
"required": [ | |
"ids", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"ids": { | |
"type": "array", | |
"description": "The IDs of the deleted product variants.", | |
"items": { | |
"type": "string", | |
"title": "ids", | |
"description": "The ID of a deleted variant." | |
} | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted objects.", | |
"default": "variant" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the product variants were deleted." | |
} | |
} | |
} | |
} | |
}, | |
"AdminBatchUpdateProductVariant": { | |
"type": "object", | |
"description": "The properties to update of a product variant.", | |
"x-schemaName": "AdminBatchUpdateProductVariant", | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product variant's title." | |
}, | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The product variant's SKU." | |
}, | |
"ean": { | |
"type": "string", | |
"title": "ean", | |
"description": "The product variant's EAN." | |
}, | |
"upc": { | |
"type": "string", | |
"title": "upc", | |
"description": "The product variant's UPC." | |
}, | |
"barcode": { | |
"type": "string", | |
"title": "barcode", | |
"description": "The product variant's barcode." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The product variant's HS code." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The product variant's MID code." | |
}, | |
"allow_backorder": { | |
"type": "boolean", | |
"title": "allow_backorder", | |
"description": "Whether customers can order the variant even if it's not in stock." | |
}, | |
"manage_inventory": { | |
"type": "boolean", | |
"title": "manage_inventory", | |
"description": "Whether the Medusa application manages the variant's inventory. If disabled, the product variant is always considered in stock." | |
}, | |
"variant_rank": { | |
"type": "number", | |
"title": "variant_rank", | |
"description": "The product variant's rank among its siblings." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The product variant's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The product variant's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The product variant's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The product variant's width." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The product variant's origin country." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The product variant's material." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product variant's metadata, can hold custom key-value pairs." | |
}, | |
"prices": { | |
"type": "array", | |
"description": "The product variant's prices.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateProductVariantPrice" | |
} | |
}, | |
"options": { | |
"type": "object", | |
"description": "The product variant's options." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The update's ID." | |
} | |
}, | |
"required": [ | |
"id" | |
] | |
}, | |
"AdminCampaign": { | |
"type": "object", | |
"description": "The campaign's details.", | |
"x-schemaName": "AdminCampaign", | |
"required": [ | |
"id", | |
"name", | |
"description", | |
"currency", | |
"campaign_identifier", | |
"starts_at", | |
"ends_at", | |
"budget", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The campaign's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The campaign's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The campaign's description." | |
}, | |
"currency": { | |
"type": "string", | |
"title": "currency", | |
"description": "The campaign's currency." | |
}, | |
"campaign_identifier": { | |
"type": "string", | |
"title": "campaign_identifier", | |
"description": "The campaign's identifier." | |
}, | |
"starts_at": { | |
"type": "string", | |
"title": "starts_at", | |
"description": "The date and time that the campaign starts." | |
}, | |
"ends_at": { | |
"type": "string", | |
"title": "ends_at", | |
"description": "The date and time that the campaign ends." | |
}, | |
"budget": { | |
"type": "object", | |
"description": "The campaign's budget.", | |
"required": [ | |
"id", | |
"type", | |
"currency_code", | |
"limit", | |
"used" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The budget's ID." | |
}, | |
"type": { | |
"type": "string", | |
"description": "The budget's type. `spend` means the limit is set on the total amount discounted by the campaign's promotions; `usage` means the limit is set on the total number of times the campaign's promotions can be used.\n", | |
"enum": [ | |
"spend", | |
"usage" | |
] | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The budget's currency code." | |
}, | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The budget's limit." | |
}, | |
"used": { | |
"type": "number", | |
"title": "used", | |
"description": "How much of the budget has been used. If the limit is `spend`, this property holds the total amount discounted so far. If the limit is `usage`, it holds the number of times the campaign's promotions have been used so far.\n" | |
} | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the campaign was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the campaign was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the campaign was deleted." | |
} | |
} | |
}, | |
"AdminCampaignResponse": { | |
"type": "object", | |
"description": "The campaign's details.", | |
"x-schemaName": "AdminCampaignResponse", | |
"required": [ | |
"campaign" | |
], | |
"properties": { | |
"campaign": { | |
"$ref": "#/components/schemas/AdminCampaign" | |
} | |
} | |
}, | |
"AdminClaim": { | |
"type": "object", | |
"description": "The claim's details.", | |
"x-schemaName": "AdminClaim", | |
"required": [ | |
"order", | |
"return", | |
"id", | |
"type", | |
"order_id", | |
"display_id", | |
"order_version", | |
"created_at", | |
"updated_at", | |
"canceled_at", | |
"additional_items", | |
"claim_items" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The claim's ID." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order associated with the claim." | |
}, | |
"claim_items": { | |
"type": "array", | |
"description": "The order items targetted by the claim.", | |
"items": { | |
"$ref": "#/components/schemas/BaseClaimItem" | |
} | |
}, | |
"additional_items": { | |
"type": "array", | |
"description": "The outbound or new items of the claim.", | |
"items": { | |
"$ref": "#/components/schemas/BaseClaimItem" | |
} | |
}, | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
}, | |
"return_id": { | |
"type": "string", | |
"title": "return_id", | |
"description": "The ID of the associated return." | |
}, | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether the customer should be notified about changes in the claim." | |
}, | |
"refund_amount": { | |
"type": "number", | |
"title": "refund_amount", | |
"description": "The amount to be refunded." | |
}, | |
"display_id": { | |
"type": "number", | |
"title": "display_id", | |
"description": "The claim's display ID." | |
}, | |
"shipping_methods": { | |
"type": "array", | |
"description": "The claim's shipping methods.", | |
"items": { | |
"$ref": "#/components/schemas/AdminOrderShippingMethod" | |
} | |
}, | |
"transactions": { | |
"type": "array", | |
"description": "The claim's transactions.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions", | |
"description": "Learn more about transactions of orders and associated models." | |
}, | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderTransaction" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The claim's metadata, used to store custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The claim's creation date." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The claim's update date." | |
}, | |
"order": { | |
"$ref": "#/components/schemas/AdminOrder" | |
}, | |
"type": { | |
"type": "string", | |
"description": "The claim's type.", | |
"enum": [ | |
"replace", | |
"refund" | |
] | |
}, | |
"order_version": { | |
"type": "string", | |
"title": "order_version", | |
"description": "The version of the order when the claim is applied." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created the claim." | |
}, | |
"canceled_at": { | |
"type": "string", | |
"title": "canceled_at", | |
"description": "The date the claim was canceled.", | |
"format": "date-time" | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the claim was deleted." | |
} | |
} | |
}, | |
"AdminClaimDeleteResponse": { | |
"type": "object", | |
"description": "The details of the deleted claim.", | |
"x-schemaName": "AdminClaimDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The claim's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "claim" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the claim was deleted." | |
} | |
} | |
}, | |
"AdminClaimListResponse": { | |
"type": "object", | |
"description": "The paginated list of claims.", | |
"x-schemaName": "AdminClaimListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"claims" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"claims": { | |
"type": "array", | |
"description": "The list of claims.", | |
"items": { | |
"$ref": "#/components/schemas/AdminClaim" | |
} | |
} | |
} | |
}, | |
"AdminClaimOrderResponse": { | |
"type": "object", | |
"description": "The created claim's details.", | |
"x-schemaName": "AdminClaimOrderResponse", | |
"required": [ | |
"order", | |
"claim" | |
], | |
"properties": { | |
"order": { | |
"$ref": "#/components/schemas/Order" | |
}, | |
"claim": { | |
"$ref": "#/components/schemas/AdminClaim" | |
} | |
} | |
}, | |
"AdminClaimPreviewResponse": { | |
"type": "object", | |
"description": "The details of the claim, as well as a preview of the order when the claim is applied.", | |
"x-schemaName": "AdminClaimPreviewResponse", | |
"required": [ | |
"order_preview", | |
"claim" | |
], | |
"properties": { | |
"order_preview": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
}, | |
"claim": { | |
"$ref": "#/components/schemas/AdminClaim" | |
} | |
} | |
}, | |
"AdminClaimRequestResponse": { | |
"type": "object", | |
"description": "The details of the claim, its return, and a preview of the order when the claim is applied.", | |
"x-schemaName": "AdminClaimRequestResponse", | |
"required": [ | |
"return", | |
"order_preview", | |
"claim" | |
], | |
"properties": { | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
}, | |
"order_preview": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
}, | |
"claim": { | |
"$ref": "#/components/schemas/AdminClaim" | |
} | |
} | |
}, | |
"AdminClaimResponse": { | |
"type": "object", | |
"description": "The claim's details.", | |
"x-schemaName": "AdminClaimResponse", | |
"required": [ | |
"claim" | |
], | |
"properties": { | |
"claim": { | |
"$ref": "#/components/schemas/AdminClaim" | |
} | |
} | |
}, | |
"AdminClaimReturnPreviewResponse": { | |
"type": "object", | |
"description": "The details of the claim's return, with a preview of the order when the claim's return is applied.", | |
"x-schemaName": "AdminClaimReturnPreviewResponse", | |
"required": [ | |
"order_preview", | |
"return" | |
], | |
"properties": { | |
"order_preview": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
}, | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
} | |
} | |
}, | |
"AdminCollection": { | |
"type": "object", | |
"description": "The product collection's details.", | |
"x-schemaName": "AdminCollection", | |
"required": [ | |
"id", | |
"title", | |
"handle", | |
"created_at", | |
"updated_at", | |
"deleted_at", | |
"metadata" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The collection's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The collection's title." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The collection's handle." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The collection's creation date." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The collection's update date." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The collection's deletion date." | |
}, | |
"products": { | |
"type": "array", | |
"description": "The collection's products.", | |
"items": { | |
"$ref": "#/components/schemas/BaseProduct" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The collection's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCollectionDeleteResponse": { | |
"type": "object", | |
"description": "The details of the deleted collection.", | |
"x-schemaName": "AdminCollectionDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The collection's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "collection" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the collection was deleted." | |
} | |
} | |
}, | |
"AdminCollectionListResponse": { | |
"type": "object", | |
"description": "The paginated list of product collections.", | |
"x-schemaName": "AdminCollectionListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"collections" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned results." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"collections": { | |
"type": "array", | |
"description": "The list of product collections.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCollection" | |
} | |
} | |
} | |
}, | |
"AdminCollectionResponse": { | |
"type": "object", | |
"description": "The collection's details.", | |
"x-schemaName": "AdminCollectionResponse", | |
"required": [ | |
"collection" | |
], | |
"properties": { | |
"collection": { | |
"$ref": "#/components/schemas/AdminCollection" | |
} | |
} | |
}, | |
"AdminCreateApiKey": { | |
"type": "object", | |
"description": "The API key's details.", | |
"x-schemaName": "AdminCreateApiKey", | |
"required": [ | |
"title", | |
"type" | |
], | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The API key's title." | |
}, | |
"type": { | |
"type": "string", | |
"description": "The API key's type. Use `secret` for a user's API key; Use `publishable` for Publishable API keys.", | |
"enum": [ | |
"publishable", | |
"secret" | |
] | |
} | |
} | |
}, | |
"AdminCreateCollection": { | |
"type": "object", | |
"description": "the product collection's details.", | |
"x-schemaName": "AdminCreateCollection", | |
"required": [ | |
"title" | |
], | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The collection's title." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The collection's handle." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The collection's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateCustomerGroup": { | |
"type": "object", | |
"description": "The customer group's details.", | |
"x-schemaName": "AdminCreateCustomerGroup", | |
"required": [ | |
"name" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The customer group's name." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The customer group's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateFulfillment": { | |
"type": "object", | |
"description": "The filfillment's details.", | |
"x-schemaName": "AdminCreateFulfillment", | |
"required": [ | |
"data", | |
"items", | |
"metadata", | |
"order_id", | |
"location_id", | |
"provider_id", | |
"delivery_address", | |
"labels" | |
], | |
"properties": { | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the location the items are fulfilled from." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the provider handling this fulfillment." | |
}, | |
"delivery_address": { | |
"type": "object", | |
"description": "The address to deliver the items to.", | |
"properties": { | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The customer's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The customer's last name." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The customer's phone." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The delivery address's company." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The delivery address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The delivery address's second line." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The delivery address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The delivery address's country code." | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The delivery address's province." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The delivery address's postal code." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The delivery address's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"items": { | |
"type": "array", | |
"description": "The items to fulfill.", | |
"items": { | |
"type": "object", | |
"description": "An item to fulfill.", | |
"required": [ | |
"title", | |
"quantity", | |
"sku", | |
"barcode" | |
], | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The item's title." | |
}, | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The item's SKU." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The quantity to fulfill of the item." | |
}, | |
"barcode": { | |
"type": "string", | |
"title": "barcode", | |
"description": "The item's barcode." | |
}, | |
"line_item_id": { | |
"type": "string", | |
"title": "line_item_id", | |
"description": "The ID of the associated line item." | |
}, | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the inventory item associated with the underlying variant." | |
} | |
} | |
} | |
}, | |
"labels": { | |
"type": "array", | |
"description": "The labels for the fulfillment's shipments.", | |
"items": { | |
"type": "object", | |
"description": "A shipment's label.", | |
"required": [ | |
"tracking_number", | |
"tracking_url", | |
"label_url" | |
], | |
"properties": { | |
"tracking_number": { | |
"type": "string", | |
"title": "tracking_number", | |
"description": "The label's tracking number." | |
}, | |
"tracking_url": { | |
"type": "string", | |
"title": "tracking_url", | |
"description": "The label's tracking URL." | |
}, | |
"label_url": { | |
"type": "string", | |
"title": "label_url", | |
"description": "The label's URL." | |
} | |
} | |
} | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this fulfillment is created for." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the shipping option used in the order." | |
}, | |
"data": { | |
"type": "object", | |
"description": "Any data useful for the fulfillment provider to handle the fulfillment.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property", | |
"description": "Learn more about the data property." | |
} | |
}, | |
"packed_at": { | |
"type": "string", | |
"title": "packed_at", | |
"description": "The date and time the fulfillment was packed.", | |
"format": "date-time" | |
}, | |
"shipped_at": { | |
"type": "string", | |
"title": "shipped_at", | |
"description": "The date and time the fulfillment was shipped.", | |
"format": "date-time" | |
}, | |
"delivered_at": { | |
"type": "string", | |
"title": "delivered_at", | |
"description": "The date and time the fulfillment was delivered.", | |
"format": "date-time" | |
}, | |
"canceled_at": { | |
"type": "string", | |
"title": "canceled_at", | |
"description": "The date and time the fulfillment was canceled.", | |
"format": "date-time" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The fulfillment's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateInventoryItem": { | |
"type": "object", | |
"description": "The inventory item's details.", | |
"x-schemaName": "AdminCreateInventoryItem", | |
"properties": { | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The inventory item's SKU." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The inventory item's HS code." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The inventory item's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The inventory item's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The inventory item's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The inventory item's width." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The inventory item's origin country." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The inventory item's mid code." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The inventory item's material." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The inventory item's title." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The description of the variant associated with the inventory item." | |
}, | |
"requires_shipping": { | |
"type": "boolean", | |
"title": "requires_shipping", | |
"description": "Whether the item requires shipping." | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The inventory item's thumbnail." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The inventory item's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreatePriceList": { | |
"type": "object", | |
"description": "The price list's details.", | |
"x-schemaName": "AdminCreatePriceList", | |
"required": [ | |
"title", | |
"description" | |
], | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The price list's title." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The price list's description." | |
}, | |
"starts_at": { | |
"type": "string", | |
"title": "starts_at", | |
"description": "The date and time the price list starts at.", | |
"format": "date-time" | |
}, | |
"ends_at": { | |
"type": "string", | |
"title": "ends_at", | |
"description": "The date and time the price list ends at.", | |
"format": "date-time" | |
}, | |
"status": { | |
"type": "string", | |
"description": "The price list's status.", | |
"enum": [ | |
"active", | |
"draft" | |
] | |
}, | |
"type": { | |
"type": "string", | |
"description": "The price list's type.", | |
"enum": [ | |
"sale", | |
"override" | |
] | |
}, | |
"rules": { | |
"type": "object", | |
"description": "The price list's rules.", | |
"example": { | |
"product_category_id": "pcat_123" | |
} | |
}, | |
"prices": { | |
"type": "array", | |
"description": "The price list's prices.", | |
"items": { | |
"type": "object", | |
"description": "A price's details.", | |
"required": [ | |
"currency_code", | |
"variant_id", | |
"amount" | |
], | |
"properties": { | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The price's currency code." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The price's amount." | |
}, | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the product variant this price is for." | |
}, | |
"min_quantity": { | |
"type": "number", | |
"title": "min_quantity", | |
"description": "The minimum quantity required in the cart for this price to be applied." | |
}, | |
"max_quantity": { | |
"type": "number", | |
"title": "max_quantity", | |
"description": "The maximum quantity in the cart that shouldn't be crossed for this price to be applied." | |
}, | |
"rules": { | |
"type": "object", | |
"description": "The price's rules.", | |
"example": { | |
"region_id": "reg_123" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminCreatePricePreference": { | |
"type": "object", | |
"description": "The price preference's details.", | |
"x-schemaName": "AdminCreatePricePreference", | |
"properties": { | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The name of the attribute the price preference applies on.", | |
"example": "currency_code" | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The attribute's value.", | |
"example": "usd" | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether the price is tax inclusive if the value of the specified attribute matches the specified value." | |
} | |
} | |
}, | |
"AdminCreateProduct": { | |
"type": "object", | |
"description": "The product's details.", | |
"x-schemaName": "AdminCreateProduct", | |
"required": [ | |
"title", | |
"options" | |
], | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product's title." | |
}, | |
"subtitle": { | |
"type": "string", | |
"title": "subtitle", | |
"description": "The product's subtitle." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The product's description." | |
}, | |
"is_giftcard": { | |
"type": "boolean", | |
"title": "is_giftcard", | |
"description": "Whether the product is a gift card." | |
}, | |
"discountable": { | |
"type": "boolean", | |
"title": "discountable", | |
"description": "Whether the product is discountable." | |
}, | |
"images": { | |
"type": "array", | |
"description": "The product's images.", | |
"items": { | |
"type": "object", | |
"description": "A product's image details.", | |
"required": [ | |
"url" | |
], | |
"properties": { | |
"url": { | |
"type": "string", | |
"title": "url", | |
"description": "The image's URL." | |
} | |
} | |
} | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The URL of the product's thumbnail." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The product's handle." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The product's status.", | |
"enum": [ | |
"draft", | |
"proposed", | |
"published", | |
"rejected" | |
] | |
}, | |
"type_id": { | |
"type": "string", | |
"title": "type_id", | |
"description": "The ID of the type the product belongs to." | |
}, | |
"collection_id": { | |
"type": "string", | |
"title": "collection_id", | |
"description": "The ID of the collection the product belongs to." | |
}, | |
"categories": { | |
"type": "array", | |
"description": "The categories the product belongs to.", | |
"items": { | |
"type": "object", | |
"description": "A category's details.", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The category's ID." | |
} | |
} | |
} | |
}, | |
"tags": { | |
"type": "array", | |
"description": "The product's tags.", | |
"items": { | |
"type": "object", | |
"description": "A tag's details.", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tag's ID." | |
} | |
} | |
} | |
}, | |
"options": { | |
"type": "array", | |
"description": "The product's options.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateProductOption" | |
} | |
}, | |
"variants": { | |
"type": "array", | |
"description": "The product's variants.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateProductVariant" | |
} | |
}, | |
"sales_channels": { | |
"type": "array", | |
"description": "The sales channels the product is available in.", | |
"items": { | |
"type": "object", | |
"description": "A sales channel's details.", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The sales channel's ID." | |
} | |
} | |
} | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The product's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The product's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The product's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The product's width." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The product's HS code." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The product's MID code." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The product's origin country." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The product's material." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product's metadata, used to store custom key-value pairs." | |
}, | |
"external_id": { | |
"type": "string", | |
"title": "external_id", | |
"description": "The ID of the product in an external or third-party system." | |
} | |
} | |
}, | |
"AdminCreateProductCategory": { | |
"type": "object", | |
"description": "The product category's details.", | |
"x-schemaName": "AdminCreateProductCategory", | |
"required": [ | |
"name" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The product category's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The product category's description." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The product category's handle." | |
}, | |
"is_internal": { | |
"type": "boolean", | |
"title": "is_internal", | |
"description": "Whether the product category is only used and seen by admin users." | |
}, | |
"is_active": { | |
"type": "boolean", | |
"title": "is_active", | |
"description": "Whether the product category is active." | |
}, | |
"parent_category_id": { | |
"type": "string", | |
"title": "parent_category_id", | |
"description": "The ID of a category that's the parent of this one." | |
}, | |
"rank": { | |
"type": "number", | |
"title": "rank", | |
"description": "The sorting order of the product category among sibling categories." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product category's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateProductOption": { | |
"type": "object", | |
"description": "The product option's details.", | |
"x-schemaName": "AdminCreateProductOption", | |
"required": [ | |
"title", | |
"values" | |
], | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product option's title." | |
}, | |
"values": { | |
"type": "array", | |
"description": "The product option's values.", | |
"items": { | |
"type": "string", | |
"title": "values", | |
"description": "A value." | |
} | |
} | |
} | |
}, | |
"AdminCreateProductTag": { | |
"type": "object", | |
"description": "The product tag's details.", | |
"x-schemaName": "AdminCreateProductTag", | |
"required": [ | |
"value" | |
], | |
"properties": { | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The product tag's value." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product tag's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateProductType": { | |
"type": "object", | |
"description": "The details of the product type to create.", | |
"x-schemaName": "AdminCreateProductType", | |
"required": [ | |
"value" | |
], | |
"properties": { | |
"metadata": { | |
"type": "object", | |
"description": "The product's metadata, used to store custom key-value pairs." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The product type's value." | |
} | |
} | |
}, | |
"AdminCreateProductVariant": { | |
"type": "object", | |
"description": "The product variant's details.", | |
"x-schemaName": "AdminCreateProductVariant", | |
"required": [ | |
"title", | |
"prices" | |
], | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The variant's title." | |
}, | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The variant's SKU." | |
}, | |
"ean": { | |
"type": "string", | |
"title": "ean", | |
"description": "The variant's EAN." | |
}, | |
"upc": { | |
"type": "string", | |
"title": "upc", | |
"description": "The variant's UPC." | |
}, | |
"barcode": { | |
"type": "string", | |
"title": "barcode", | |
"description": "The variant's barcode." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The variant's HS code." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The variant's MID code." | |
}, | |
"allow_backorder": { | |
"type": "boolean", | |
"title": "allow_backorder", | |
"description": "Whether it's allowed to order this variant when it's out of stock." | |
}, | |
"manage_inventory": { | |
"type": "boolean", | |
"title": "manage_inventory", | |
"description": "Whether Medusa manages the variant's inventory quantity. If disabled, the product variant is always considered in stock." | |
}, | |
"variant_rank": { | |
"type": "number", | |
"title": "variant_rank", | |
"description": "The sorting order of the variant among other variants in the product." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The variant's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The variant's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The variant's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The variant's width." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The variant's origin country." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The variant's material." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The variant's metadata, used to store custom key-value pairs." | |
}, | |
"prices": { | |
"type": "array", | |
"description": "The variant's prices.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateProductVariantPrice" | |
} | |
}, | |
"options": { | |
"type": "object", | |
"description": "The variant's options, where the key is an option's name, and the value is the option's value.", | |
"example": { | |
"Color": "Black" | |
} | |
}, | |
"inventory_items": { | |
"type": "array", | |
"description": "The variant's inventory items to create.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateProductVariantInventoryKit" | |
} | |
} | |
} | |
}, | |
"AdminCreateProductVariantInventoryKit": { | |
"type": "object", | |
"description": "The details of a variant's inventory item.", | |
"x-schemaName": "AdminCreateProductVariantInventoryKit", | |
"required": [ | |
"inventory_item_id" | |
], | |
"properties": { | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The inventory item's ID." | |
}, | |
"required_quantity": { | |
"type": "number", | |
"title": "required_quantity", | |
"description": "The number of units a single quantity is equivalent to. For example, if a customer orders one quantity of the variant, Medusa checks the availability of the quantity multiplied by the value set for `required_quantity`. When the customer orders the quantity, Medusa reserves the ordered quantity multiplied by the value set for `required_quantity`." | |
} | |
} | |
}, | |
"AdminCreateProductVariantPrice": { | |
"type": "object", | |
"description": "The details of a variant's price.", | |
"x-schemaName": "AdminCreateProductVariantPrice", | |
"required": [ | |
"currency_code", | |
"amount" | |
], | |
"properties": { | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The price's currency code." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The price's amount." | |
}, | |
"min_quantity": { | |
"type": "number", | |
"title": "min_quantity", | |
"description": "The minimum quantity that must be available in the cart for this price to apply." | |
}, | |
"max_quantity": { | |
"type": "number", | |
"title": "max_quantity", | |
"description": "The maximum quantity that must not be surpassed in the cart for this price to apply." | |
}, | |
"rules": { | |
"type": "object", | |
"description": "The price's rules.", | |
"example": { | |
"region_id": "reg_123" | |
}, | |
"properties": { | |
"region_id": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of a region." | |
} | |
}, | |
"required": [ | |
"region_id" | |
] | |
} | |
} | |
}, | |
"AdminCreatePromotionRule": { | |
"type": "object", | |
"description": "The promotion rule's details.", | |
"x-schemaName": "AdminCreatePromotionRule", | |
"required": [ | |
"operator", | |
"attribute", | |
"values" | |
], | |
"properties": { | |
"operator": { | |
"type": "string", | |
"description": "The operator used to check whether the buy rule applies on a cart. For example, `eq` means that the cart's value for the specified attribute must match the specified value.", | |
"enum": [ | |
"gte", | |
"lte", | |
"gt", | |
"lt", | |
"eq", | |
"ne", | |
"in" | |
] | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The rule's description." | |
}, | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The attribute to compare against when checking whether a promotion can be applied on a cart.", | |
"example": "items.product.id" | |
}, | |
"values": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "values", | |
"description": "The attribute's value.", | |
"example": "prod_123" | |
}, | |
{ | |
"type": "array", | |
"description": "The allowed attribute values.", | |
"items": { | |
"type": "string", | |
"title": "values", | |
"description": "An attribute value.", | |
"example": "prod_123" | |
} | |
} | |
] | |
} | |
} | |
}, | |
"AdminCreateRefundReason": { | |
"type": "object", | |
"description": "The refund reason's details.", | |
"x-schemaName": "AdminCreateRefundReason", | |
"required": [ | |
"label" | |
], | |
"properties": { | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The refund reason's label." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The refund reason's description." | |
} | |
} | |
}, | |
"AdminCreateRegion": { | |
"type": "object", | |
"description": "The region's details.", | |
"x-schemaName": "AdminCreateRegion", | |
"required": [ | |
"name", | |
"currency_code" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The region's name." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The region's currency code.", | |
"example": "usd" | |
}, | |
"countries": { | |
"type": "array", | |
"description": "The region's countries.", | |
"items": { | |
"type": "string", | |
"title": "countries", | |
"description": "A country code.", | |
"example": "us" | |
} | |
}, | |
"automatic_taxes": { | |
"type": "boolean", | |
"title": "automatic_taxes", | |
"description": "Whether taxes are calculated automatically during checkout in this region." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether prices in this region are tax inclusive." | |
}, | |
"payment_providers": { | |
"type": "array", | |
"description": "The payment providers enabled in this region.", | |
"items": { | |
"type": "string", | |
"title": "payment_providers", | |
"description": "A payment provider's ID.", | |
"example": "pp_stripe_stripe" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The region's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateReservation": { | |
"type": "object", | |
"description": "The reservation's details.", | |
"x-schemaName": "AdminCreateReservation", | |
"required": [ | |
"location_id", | |
"inventory_item_id", | |
"quantity" | |
], | |
"properties": { | |
"line_item_id": { | |
"type": "string", | |
"title": "line_item_id", | |
"description": "The ID of the line item this reservation is created for." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the location the quantity is reserved from." | |
}, | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the inventory item associated with the line item's variant." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The reserved quantity." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The reservation's description." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The reservation's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateReturnReason": { | |
"type": "object", | |
"description": "The details of the return reason to create.", | |
"x-schemaName": "AdminCreateReturnReason", | |
"required": [ | |
"value", | |
"label" | |
], | |
"properties": { | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The return reason's value." | |
}, | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The return reason's label." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The return reason's description." | |
}, | |
"parent_return_reason_id": { | |
"type": "string", | |
"title": "parent_return_reason_id", | |
"description": "The ID of the parent return reason." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The return reason's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateSalesChannel": { | |
"type": "object", | |
"description": "The sales channel's details.", | |
"x-schemaName": "AdminCreateSalesChannel", | |
"required": [ | |
"name" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The sales channel's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The sales channel's description." | |
}, | |
"is_disabled": { | |
"type": "boolean", | |
"title": "is_disabled", | |
"description": "Whether the sales channel is disabled." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The sales channel's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateShipment": { | |
"type": "object", | |
"description": "The shipment's details.", | |
"x-schemaName": "AdminCreateShipment", | |
"required": [ | |
"labels" | |
], | |
"properties": { | |
"labels": { | |
"type": "array", | |
"description": "The shipment's labels.", | |
"items": { | |
"type": "object", | |
"description": "A shipment label's details.", | |
"required": [ | |
"tracking_number", | |
"tracking_url", | |
"label_url" | |
], | |
"properties": { | |
"tracking_number": { | |
"type": "string", | |
"title": "tracking_number", | |
"description": "The label's tracking number." | |
}, | |
"tracking_url": { | |
"type": "string", | |
"title": "tracking_url", | |
"description": "The label's tracking URL." | |
}, | |
"label_url": { | |
"type": "string", | |
"title": "label_url", | |
"description": "The label's URL." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminCreateShippingOption": { | |
"type": "object", | |
"description": "The shipping option's details.", | |
"x-schemaName": "AdminCreateShippingOption", | |
"required": [ | |
"name", | |
"service_zone_id", | |
"shipping_profile_id", | |
"price_type", | |
"provider_id", | |
"type", | |
"prices" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The shipping option's name." | |
}, | |
"service_zone_id": { | |
"type": "string", | |
"title": "service_zone_id", | |
"description": "The ID of the associated service zone." | |
}, | |
"shipping_profile_id": { | |
"type": "string", | |
"title": "shipping_profile_id", | |
"description": "The ID of the associated shipping profile." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The shipping option's data, useful for the fulfillment provider handling its processing.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property" | |
} | |
}, | |
"price_type": { | |
"type": "string", | |
"description": "The shipping option's price type. If `flat`, the shipping option has a fixed price set in `prices`. Otherwise, the shipping option's price is calculated by the fulfillment provider.", | |
"enum": [ | |
"flat", | |
"calculated" | |
] | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the fulfillment provider handling this shipping option." | |
}, | |
"type": { | |
"$ref": "#/components/schemas/AdminCreateShippingOptionType" | |
}, | |
"prices": { | |
"type": "array", | |
"description": "The shipping option's prices.", | |
"items": { | |
"oneOf": [ | |
{ | |
"type": "object", | |
"description": "The price's details.", | |
"x-schemaName": "AdminCreateShippingOptionPriceWithCurrency", | |
"required": [ | |
"currency_code", | |
"amount" | |
], | |
"properties": { | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The price's currency code.", | |
"example": "usd" | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The price's amount." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The price's details.", | |
"x-schemaName": "AdminCreateShippingOptionPriceWithRegion", | |
"required": [ | |
"region_id", | |
"amount" | |
], | |
"properties": { | |
"region_id": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of the region this price is used in." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The price's amount." | |
} | |
} | |
} | |
] | |
} | |
}, | |
"rules": { | |
"type": "array", | |
"description": "The shipping option's rules.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateShippingOptionRule" | |
} | |
} | |
} | |
}, | |
"AdminCreateShippingOptionRule": { | |
"type": "object", | |
"description": "The details of the shipping option rule.", | |
"x-schemaName": "AdminCreateShippingOptionRule", | |
"required": [ | |
"operator", | |
"attribute", | |
"value" | |
], | |
"properties": { | |
"operator": { | |
"type": "string", | |
"description": "The operator used to check whether a rule applies.", | |
"enum": [ | |
"gt", | |
"lt", | |
"eq", | |
"ne", | |
"in", | |
"lte", | |
"gte", | |
"nin" | |
] | |
}, | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The name of a property or table that the rule applies to.", | |
"example": "customer_group" | |
}, | |
"value": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "value", | |
"description": "A value of the attribute that enables this rule.", | |
"example": "cusgroup_123" | |
}, | |
{ | |
"type": "array", | |
"description": "Values of the attribute that enable this rule.", | |
"items": { | |
"type": "string", | |
"title": "value", | |
"description": "A value of the attribute that enables this rule.", | |
"example": "cusgroup_123" | |
} | |
} | |
] | |
} | |
} | |
}, | |
"AdminCreateShippingOptionType": { | |
"type": "object", | |
"description": "The shipping option type's details.", | |
"x-schemaName": "AdminCreateShippingOptionType", | |
"required": [ | |
"label", | |
"description", | |
"code" | |
], | |
"properties": { | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The type's label." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The type's description." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The type's code." | |
} | |
} | |
}, | |
"AdminCreateShippingProfile": { | |
"type": "object", | |
"description": "The shipping profile's details.", | |
"x-schemaName": "AdminCreateShippingProfile", | |
"required": [ | |
"name", | |
"type" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The shipping profile's name." | |
}, | |
"type": { | |
"type": "string", | |
"title": "type", | |
"description": "The shipping profile's type." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The shipping profile's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateStockLocation": { | |
"type": "object", | |
"description": "The stock location's details.", | |
"x-schemaName": "AdminCreateStockLocation", | |
"required": [ | |
"name" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The stock location's name." | |
}, | |
"address_id": { | |
"type": "string", | |
"title": "address_id", | |
"description": "The ID of the stock location's address." | |
}, | |
"address": { | |
"$ref": "#/components/schemas/AdminUpsertStockLocationAddress" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The stock location's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateTaxRate": { | |
"type": "object", | |
"description": "The tax rate's details.", | |
"x-schemaName": "AdminCreateTaxRate", | |
"required": [ | |
"name", | |
"tax_region_id", | |
"code" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The tax rate's name.", | |
"example": "VAT" | |
}, | |
"tax_region_id": { | |
"type": "string", | |
"title": "tax_region_id", | |
"description": "The ID of the tax region this rate belongs to." | |
}, | |
"rate": { | |
"type": "number", | |
"title": "rate", | |
"description": "The rate to charge.", | |
"example": 10 | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The code the tax rate is identified by." | |
}, | |
"rules": { | |
"type": "array", | |
"description": "The tax rate's rules.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateTaxRateRule" | |
} | |
}, | |
"is_default": { | |
"type": "boolean", | |
"title": "is_default", | |
"description": "Whether the tax rate is the default in its tax region." | |
}, | |
"is_combinable": { | |
"type": "boolean", | |
"title": "is_combinable", | |
"description": "Whether the tax rate should be combined with parent rates.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The tax rate's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateTaxRateRule": { | |
"type": "object", | |
"description": "The tax rate rule's details.", | |
"x-schemaName": "AdminCreateTaxRateRule", | |
"required": [ | |
"reference", | |
"reference_id" | |
], | |
"properties": { | |
"reference": { | |
"type": "string", | |
"title": "reference", | |
"description": "The name of a table in the database that this rule points to.", | |
"example": "product_type" | |
}, | |
"reference_id": { | |
"type": "string", | |
"title": "reference_id", | |
"description": "The ID of a record in the table specified in reference.", | |
"example": "ptype_123" | |
} | |
} | |
}, | |
"AdminCreateTaxRegion": { | |
"type": "object", | |
"description": "The tax region's details.", | |
"x-schemaName": "AdminCreateTaxRegion", | |
"required": [ | |
"country_code" | |
], | |
"properties": { | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The tax region's country code.", | |
"example": "us" | |
}, | |
"province_code": { | |
"type": "string", | |
"title": "province_code", | |
"description": "The tax region's province code." | |
}, | |
"parent_id": { | |
"type": "string", | |
"title": "parent_id", | |
"description": "The ID of the parent tax region." | |
}, | |
"default_tax_rate": { | |
"type": "object", | |
"description": "The tax region's default tax rate.", | |
"required": [ | |
"code", | |
"name" | |
], | |
"properties": { | |
"rate": { | |
"type": "number", | |
"title": "rate", | |
"description": "The rate to charge.", | |
"example": 10 | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The code the tax rate is identified by" | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The default tax rate's name.", | |
"example": "VAT" | |
}, | |
"is_combinable": { | |
"type": "boolean", | |
"description": "Whether the tax rate should be combined with parent rates.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The default tax rate's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The tax region's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"AdminCreateVariantInventoryItem": { | |
"type": "object", | |
"description": "The details of the variant-inventory item association.", | |
"x-schemaName": "AdminCreateVariantInventoryItem", | |
"required": [ | |
"inventory_item_id", | |
"required_quantity" | |
], | |
"properties": { | |
"required_quantity": { | |
"type": "number", | |
"title": "required_quantity", | |
"description": "The quantity of the variant in the inventory item." | |
}, | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The inventory item's ID." | |
} | |
} | |
}, | |
"AdminCreateWorkflowsAsyncResponse": { | |
"type": "object", | |
"description": "The details of changing a workflow execution's step status.", | |
"x-schemaName": "AdminCreateWorkflowsAsyncResponse", | |
"required": [ | |
"transaction_id", | |
"step_id" | |
], | |
"properties": { | |
"transaction_id": { | |
"type": "string", | |
"title": "transaction_id", | |
"description": "The workflows execution's transaction ID." | |
}, | |
"step_id": { | |
"type": "string", | |
"title": "step_id", | |
"description": "The ID of the step whose status was changed." | |
}, | |
"response": { | |
"description": "Sets the step's response. It accepts any type." | |
}, | |
"compensate_input": { | |
"description": "Sets the compensation function's input. It accepts any response." | |
}, | |
"action": { | |
"type": "string", | |
"description": "Whether to invoke or compensate the step.", | |
"enum": [ | |
"invoke", | |
"compensate" | |
] | |
} | |
} | |
}, | |
"AdminCreateWorkflowsRun": { | |
"type": "object", | |
"description": "The details of the workflow to execute.", | |
"x-schemaName": "AdminCreateWorkflowsRun", | |
"properties": { | |
"input": { | |
"description": "The input to pass to the workflow. Can be of any type." | |
}, | |
"transaction_id": { | |
"type": "string", | |
"title": "transaction_id", | |
"description": "The ID of the workflow execution's transaction." | |
} | |
} | |
}, | |
"AdminCurrency": { | |
"type": "object", | |
"description": "The currency's currencies.", | |
"x-schemaName": "AdminCurrency", | |
"required": [ | |
"code", | |
"symbol", | |
"symbol_native", | |
"name", | |
"decimal_digits", | |
"rounding", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The currency's code.", | |
"example": "usd" | |
}, | |
"symbol": { | |
"type": "string", | |
"title": "symbol", | |
"description": "The currency's symbol.", | |
"example": "$" | |
}, | |
"symbol_native": { | |
"type": "string", | |
"title": "symbol_native", | |
"description": "The currency's native symbol, if different than the symbol.", | |
"example": "$" | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The currency's name." | |
}, | |
"decimal_digits": { | |
"type": "number", | |
"title": "decimal_digits", | |
"description": "The number of digits after the decimal for prices in this currency." | |
}, | |
"rounding": { | |
"type": "number", | |
"title": "rounding", | |
"description": "The rounding percision applied on prices in this currency." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The currency's creation date." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The currency's update date." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The currency's deletion date." | |
} | |
} | |
}, | |
"AdminCurrencyListResponse": { | |
"type": "object", | |
"description": "The paginated list of currencies.", | |
"x-schemaName": "AdminCurrencyListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"currencies" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"currencies": { | |
"type": "array", | |
"description": "The list of currencies.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCurrency" | |
} | |
} | |
} | |
}, | |
"AdminCurrencyResponse": { | |
"type": "object", | |
"description": "The currency's details.", | |
"x-schemaName": "AdminCurrencyResponse", | |
"required": [ | |
"currency" | |
], | |
"properties": { | |
"currency": { | |
"$ref": "#/components/schemas/AdminCurrency" | |
} | |
} | |
}, | |
"AdminCustomer": { | |
"type": "object", | |
"description": "The customer's details.", | |
"x-schemaName": "AdminCustomer", | |
"required": [ | |
"has_account", | |
"addresses", | |
"id", | |
"email", | |
"default_billing_address_id", | |
"default_shipping_address_id", | |
"company_name", | |
"first_name", | |
"last_name" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The customer's ID." | |
}, | |
"has_account": { | |
"type": "boolean", | |
"title": "has_account", | |
"description": "Whether the customer is registered." | |
}, | |
"groups": { | |
"type": "array", | |
"description": "The customer's groups.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCustomerGroup" | |
} | |
}, | |
"email": { | |
"type": "string", | |
"title": "email", | |
"description": "The customer's email.", | |
"format": "email" | |
}, | |
"default_billing_address_id": { | |
"type": "string", | |
"title": "default_billing_address_id", | |
"description": "The ID of the address used as the default billing address." | |
}, | |
"default_shipping_address_id": { | |
"type": "string", | |
"title": "default_shipping_address_id", | |
"description": "The ID of the address used as the default shipping address." | |
}, | |
"company_name": { | |
"type": "string", | |
"title": "company_name", | |
"description": "The customer's company name." | |
}, | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The customer's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The customer's last name." | |
}, | |
"addresses": { | |
"type": "array", | |
"description": "The customer's addresses.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCustomerAddress" | |
} | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The customer's phone." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The customer's metadata, used to store custom key-value pairs." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created this customer, if available." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The customer's creation date." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The customer's update date." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The customer's deletion date." | |
} | |
} | |
}, | |
"AdminCustomerAddress": { | |
"type": "object", | |
"description": "The customer's address.", | |
"x-schemaName": "AdminCustomerAddress", | |
"required": [ | |
"id", | |
"address_name", | |
"is_default_shipping", | |
"is_default_billing", | |
"customer_id", | |
"company", | |
"first_name", | |
"last_name", | |
"address_1", | |
"address_2", | |
"city", | |
"country_code", | |
"province", | |
"postal_code", | |
"phone", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The address's ID." | |
}, | |
"address_name": { | |
"type": "string", | |
"title": "address_name", | |
"description": "The address's name." | |
}, | |
"is_default_shipping": { | |
"type": "boolean", | |
"title": "is_default_shipping", | |
"description": "Whether the address is the default shipping address." | |
}, | |
"is_default_billing": { | |
"type": "boolean", | |
"title": "is_default_billing", | |
"description": "Whether the address is the default billing address." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "The ID of the customer that this address belongs to." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The customer's company." | |
}, | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The customer's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The customer's last name." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code.", | |
"example": "us" | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The address's phone." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The address's metadata, used to store custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The address's creation date." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The address's update date." | |
} | |
} | |
}, | |
"AdminCustomerAddressResponse": { | |
"type": "object", | |
"description": "The address's details.", | |
"x-schemaName": "AdminCustomerAddressResponse", | |
"required": [ | |
"address" | |
], | |
"properties": { | |
"address": { | |
"$ref": "#/components/schemas/AdminCustomerAddress" | |
} | |
} | |
}, | |
"AdminCustomerGroup": { | |
"type": "object", | |
"description": "The customer group's details.", | |
"x-schemaName": "AdminCustomerGroup", | |
"required": [ | |
"customers", | |
"id", | |
"name", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The customer group's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The customer group's name." | |
}, | |
"customers": { | |
"type": "array", | |
"description": "The customer group's customers.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The customer group's metadata, used to store custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The customer group's creation date." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The customer group's update date." | |
} | |
} | |
}, | |
"AdminCustomerGroupResponse": { | |
"type": "object", | |
"description": "The customer group's details.", | |
"x-schemaName": "AdminCustomerGroupResponse", | |
"required": [ | |
"customer_group" | |
], | |
"properties": { | |
"customer_group": { | |
"$ref": "#/components/schemas/AdminCustomerGroup" | |
} | |
} | |
}, | |
"AdminCustomerInGroupFilters": { | |
"type": "object", | |
"description": "Filters to apply on customers to retrieve their groups.", | |
"x-schemaName": "AdminCustomerInGroupFilters", | |
"properties": { | |
"id": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "id", | |
"description": "Filter by a customer's ID." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by customer IDs.", | |
"items": { | |
"type": "string", | |
"title": "id", | |
"description": "A customer's ID." | |
} | |
} | |
] | |
}, | |
"email": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "email", | |
"description": "Filter by a customer's email.", | |
"format": "email" | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by customer emails.", | |
"items": { | |
"type": "string", | |
"title": "email", | |
"description": "A customer's email.", | |
"format": "email" | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "Apply filters on the customer's email.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by exact matches", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "Filter by values in this array." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "Filter by values not in this array." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "Filter arrays that have overlapping values with this parameter." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "Filter arrays that contain some of the values of this parameter." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "Filter arrays that contain all values of this parameter." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
] | |
}, | |
"default_billing_address_id": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "default_billing_address_id", | |
"description": "Filter by the ID of a customer's default billing address." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by the IDs of a customers' default billing address.", | |
"items": { | |
"type": "string", | |
"title": "default_billing_address_id", | |
"description": "The ID of a customer's default billing address." | |
} | |
} | |
] | |
}, | |
"default_shipping_address_id": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "default_shipping_address_id", | |
"description": "Filter by the ID of a customer's default shipping address." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by the IDs of a customers' default shipping address.", | |
"items": { | |
"type": "string", | |
"title": "default_shipping_address_id", | |
"description": "The ID of a customer's default shipping address." | |
} | |
} | |
] | |
}, | |
"company_name": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "company_name", | |
"description": "Filter by a customer's company name." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by customers' company names.", | |
"items": { | |
"type": "string", | |
"title": "company_name", | |
"description": "A company name." | |
} | |
} | |
] | |
}, | |
"first_name": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "first_name", | |
"description": "Filter by a customer's first name." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by customers' first names.", | |
"items": { | |
"type": "string", | |
"title": "first_name", | |
"description": "A first name." | |
} | |
} | |
] | |
}, | |
"last_name": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "last_name", | |
"description": "Filter by a customer's last name." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by customers' last names.", | |
"items": { | |
"type": "string", | |
"title": "last_name", | |
"description": "A last name." | |
} | |
} | |
] | |
}, | |
"created_by": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "created_by", | |
"description": "Filter by the ID of a user to retrieve the groups of the customers they created." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by the ID of users to retrieve the groups of the customers they created.", | |
"items": { | |
"type": "string", | |
"title": "created_by", | |
"description": "A user's ID." | |
} | |
} | |
] | |
}, | |
"created_at": { | |
"type": "object", | |
"description": "Filter the customer's creation date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by exact matches", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "Filter by values in this array." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "Filter by values not in this array." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "Filter arrays that have overlapping values with this parameter." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "Filter arrays that contain some of the values of this parameter." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "Filter arrays that contain all values of this parameter." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
"updated_at": { | |
"type": "object", | |
"description": "Filter the customer's update date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by an exact match.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "Filter by values in this array." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "Filter by values not in this array." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "Filter arrays that have overlapping values with this parameter." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "Filter arrays that contain some of the values of this parameter." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "Filter arrays that contain all values of this parameter." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
"deleted_at": { | |
"type": "object", | |
"description": "Filter the customer's deletion date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by an exact match.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "Filter by values in this array." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "Filter by values not in this array." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "Filter arrays that have overlapping values with this parameter." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "Filter arrays that contain some of the values of this parameter." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "Filter arrays that contain all values of this parameter." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
} | |
}, | |
"AdminCustomerResponse": { | |
"type": "object", | |
"description": "The customer's details.", | |
"x-schemaName": "AdminCustomerResponse", | |
"required": [ | |
"customer" | |
], | |
"properties": { | |
"customer": { | |
"$ref": "#/components/schemas/AdminCustomer" | |
} | |
} | |
}, | |
"AdminDeletePaymentCollectionResponse": { | |
"type": "object", | |
"description": "The result of deleting the payment collection.", | |
"x-schemaName": "AdminDeletePaymentCollectionResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment collection's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the object that was deleted.", | |
"default": "payment-collection" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the object was deleted." | |
} | |
} | |
}, | |
"AdminDraftOrderResponse": { | |
"type": "object", | |
"description": "The draft order's details.", | |
"x-schemaName": "AdminDraftOrderResponse", | |
"required": [ | |
"draft_order" | |
], | |
"properties": { | |
"draft_order": { | |
"$ref": "#/components/schemas/AdminOrder" | |
} | |
} | |
}, | |
"AdminExchange": { | |
"type": "object", | |
"description": "The exchange's details.", | |
"x-schemaName": "AdminExchange", | |
"required": [ | |
"id", | |
"order_id", | |
"created_at", | |
"updated_at", | |
"canceled_at", | |
"deleted_at", | |
"additional_items", | |
"return_items" | |
], | |
"properties": { | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order the exchange is created for." | |
}, | |
"return_items": { | |
"type": "array", | |
"description": "The items returned (inbound) by the exchange.", | |
"items": { | |
"$ref": "#/components/schemas/AdminReturnItem" | |
} | |
}, | |
"additional_items": { | |
"type": "array", | |
"description": "The new items (outbound) sent by the exchange.", | |
"items": { | |
"$ref": "#/components/schemas/BaseExchangeItem" | |
} | |
}, | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether to send the customer notifications when the exchange is updated." | |
}, | |
"difference_due": { | |
"type": "number", | |
"title": "difference_due", | |
"description": "The amount to be exchanged or refunded. If the amount is negative, it must be refunded. If positive, additional payment is required from the customer." | |
}, | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
}, | |
"return_id": { | |
"type": "string", | |
"title": "return_id", | |
"description": "The ID of the associated exchange." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The exchange's ID." | |
}, | |
"display_id": { | |
"type": "string", | |
"title": "display_id", | |
"description": "The exchange's display ID." | |
}, | |
"shipping_methods": { | |
"type": "array", | |
"description": "The shipping methods used to send the new (outbound) items.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderShippingMethod" | |
} | |
}, | |
"transactions": { | |
"type": "array", | |
"description": "The exchange's transactions.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions" | |
}, | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderTransaction" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The exchange's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date that the exchange was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date that the exchange was updated." | |
}, | |
"order_version": { | |
"type": "string", | |
"title": "order_version", | |
"description": "The version of the order once the exchange is applied." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created the exchange." | |
}, | |
"canceled_at": { | |
"type": "string", | |
"title": "canceled_at", | |
"description": "The date the exchange was canceled.", | |
"format": "date-time" | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the exchange was deleted." | |
}, | |
"order": { | |
"$ref": "#/components/schemas/BaseOrder" | |
}, | |
"allow_backorder": { | |
"type": "boolean", | |
"title": "allow_backorder", | |
"description": "Whether variants that are out-of-stock can still be added as additional or outbound items." | |
} | |
} | |
}, | |
"AdminExchangeDeleteResponse": { | |
"type": "object", | |
"description": "The details of deleting an exchange.", | |
"x-schemaName": "AdminExchangeDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The exchange's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "exchange" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the exchange was deleted." | |
} | |
} | |
}, | |
"AdminExchangeOrderResponse": { | |
"type": "object", | |
"description": "The exchange's details.", | |
"x-schemaName": "AdminExchangeOrderResponse", | |
"required": [ | |
"order", | |
"exchange" | |
], | |
"properties": { | |
"order": { | |
"$ref": "#/components/schemas/Order" | |
}, | |
"exchange": { | |
"$ref": "#/components/schemas/AdminExchange" | |
} | |
} | |
}, | |
"AdminExchangePreviewResponse": { | |
"type": "object", | |
"description": "A preview of the order once the exchange is applied.", | |
"x-schemaName": "AdminExchangePreviewResponse", | |
"required": [ | |
"order_preview", | |
"exchange" | |
], | |
"properties": { | |
"order_preview": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
}, | |
"exchange": { | |
"$ref": "#/components/schemas/AdminExchange" | |
} | |
} | |
}, | |
"AdminExchangeRequestResponse": { | |
"type": "object", | |
"description": "The details of a requested exchange.", | |
"x-schemaName": "AdminExchangeRequestResponse", | |
"required": [ | |
"return", | |
"order_preview", | |
"exchange" | |
], | |
"properties": { | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
}, | |
"order_preview": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
}, | |
"exchange": { | |
"$ref": "#/components/schemas/AdminExchange" | |
} | |
} | |
}, | |
"AdminExchangeResponse": { | |
"type": "object", | |
"description": "The exchange's details.", | |
"x-schemaName": "AdminExchangeResponse", | |
"required": [ | |
"exchange" | |
], | |
"properties": { | |
"exchange": { | |
"$ref": "#/components/schemas/AdminExchange" | |
} | |
} | |
}, | |
"AdminExchangeReturnResponse": { | |
"type": "object", | |
"description": "The details of an exchange's return.", | |
"x-schemaName": "AdminExchangeReturnResponse", | |
"required": [ | |
"order_preview", | |
"return" | |
], | |
"properties": { | |
"order_preview": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
}, | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
} | |
} | |
}, | |
"AdminExportProductResponse": { | |
"type": "object", | |
"description": "The details of the product export.", | |
"x-schemaName": "AdminExportProductResponse", | |
"required": [ | |
"transaction_id" | |
], | |
"properties": { | |
"transaction_id": { | |
"type": "string", | |
"title": "transaction_id", | |
"description": "The ID of the workflow execution's transaction. Use it to check the status of the export by sending a GET request to `/admin/workflows-executions/export-products/:transaction-id`" | |
} | |
} | |
}, | |
"AdminFile": { | |
"type": "object", | |
"description": "A file's details.", | |
"x-schemaName": "AdminFile", | |
"required": [ | |
"id", | |
"url" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The file's ID." | |
}, | |
"url": { | |
"type": "string", | |
"title": "url", | |
"description": "The file's URL." | |
} | |
} | |
}, | |
"AdminFileListResponse": { | |
"type": "object", | |
"description": "The list of uploaded files.", | |
"x-schemaName": "AdminFileListResponse", | |
"required": [ | |
"files" | |
], | |
"properties": { | |
"files": { | |
"type": "array", | |
"description": "The list of uploaded files.", | |
"items": { | |
"$ref": "#/components/schemas/AdminFile" | |
} | |
} | |
} | |
}, | |
"AdminFileResponse": { | |
"type": "object", | |
"description": "A file's details.", | |
"x-schemaName": "AdminFileResponse", | |
"required": [ | |
"file" | |
], | |
"properties": { | |
"file": { | |
"$ref": "#/components/schemas/AdminFile" | |
} | |
} | |
}, | |
"AdminFulfillment": { | |
"type": "object", | |
"description": "The fulfillment's details.", | |
"x-schemaName": "AdminFulfillment", | |
"required": [ | |
"id", | |
"location_id", | |
"provider_id", | |
"shipping_option_id", | |
"provider", | |
"delivery_address", | |
"items", | |
"labels", | |
"packed_at", | |
"shipped_at", | |
"delivered_at", | |
"canceled_at", | |
"data", | |
"metadata", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The fulfillment's ID." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the location the fulfillment's items are shipped from." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the fulfillment provider handling this fulfillment." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the shipping option this fulfillment is created for." | |
}, | |
"provider": { | |
"$ref": "#/components/schemas/AdminFulfillmentProvider" | |
}, | |
"delivery_address": { | |
"$ref": "#/components/schemas/AdminFulfillmentAddress" | |
}, | |
"items": { | |
"type": "array", | |
"description": "The fulfillment's items.", | |
"items": { | |
"$ref": "#/components/schemas/AdminFulfillmentItem" | |
} | |
}, | |
"labels": { | |
"type": "array", | |
"description": "The fulfillment's shipment labels.", | |
"items": { | |
"$ref": "#/components/schemas/AdminFulfillmentLabel" | |
} | |
}, | |
"packed_at": { | |
"type": "string", | |
"title": "packed_at", | |
"description": "The date the fulfillment was packed at." | |
}, | |
"shipped_at": { | |
"type": "string", | |
"title": "shipped_at", | |
"description": "The date the fulfillment was shipped at." | |
}, | |
"delivered_at": { | |
"type": "string", | |
"title": "delivered_at", | |
"description": "The date the fulfillment was delivered at." | |
}, | |
"canceled_at": { | |
"type": "string", | |
"title": "canceled_at", | |
"description": "The date the fulfillment was canceled at." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The fulfillment's data, useful for the third-party provider handling the fulfillment.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The fulfillment's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the fulfillment was created at." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the fulfillment was updated at." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the fulfillment was deleted at." | |
} | |
} | |
}, | |
"AdminFulfillmentAddress": { | |
"type": "object", | |
"description": "An address's details.", | |
"x-schemaName": "AdminFulfillmentAddress", | |
"required": [ | |
"id", | |
"fulfillment_id", | |
"company", | |
"first_name", | |
"last_name", | |
"address_1", | |
"address_2", | |
"city", | |
"country_code", | |
"province", | |
"postal_code", | |
"phone", | |
"metadata", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The address's ID." | |
}, | |
"fulfillment_id": { | |
"type": "string", | |
"title": "fulfillment_id", | |
"description": "The ID of the fulfillment that the address belongs to." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The address's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The address's last name." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code." | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The address's phone." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The address's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the address was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the address was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the address was deleted." | |
} | |
} | |
}, | |
"AdminFulfillmentItem": { | |
"type": "object", | |
"description": "The details of a fulfillment's item.", | |
"x-schemaName": "AdminFulfillmentItem", | |
"required": [ | |
"id", | |
"title", | |
"quantity", | |
"sku", | |
"barcode", | |
"line_item_id", | |
"inventory_item_id", | |
"fulfillment_id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The item's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The item's title." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity to be fulfilled." | |
}, | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The item's SKU." | |
}, | |
"barcode": { | |
"type": "string", | |
"title": "barcode", | |
"description": "The item's barcode." | |
}, | |
"line_item_id": { | |
"type": "string", | |
"title": "line_item_id", | |
"description": "The ID of the order's line item to be fulfilled." | |
}, | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the inventory item of the underlying product variant." | |
}, | |
"fulfillment_id": { | |
"type": "string", | |
"title": "fulfillment_id", | |
"description": "The ID of the fulfillment the item belongs to." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the item was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the item was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the item was deleted." | |
} | |
} | |
}, | |
"AdminFulfillmentLabel": { | |
"type": "object", | |
"description": "The details of a fulfillmet's shipment label.", | |
"x-schemaName": "AdminFulfillmentLabel", | |
"required": [ | |
"id", | |
"tracking_number", | |
"tracking_url", | |
"label_url", | |
"fulfillment_id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The label's ID." | |
}, | |
"tracking_number": { | |
"type": "string", | |
"title": "tracking_number", | |
"description": "The label's tracking number." | |
}, | |
"tracking_url": { | |
"type": "string", | |
"title": "tracking_url", | |
"description": "The label's tracking URL." | |
}, | |
"label_url": { | |
"type": "string", | |
"title": "label_url", | |
"description": "The label's URL." | |
}, | |
"fulfillment_id": { | |
"type": "string", | |
"title": "fulfillment_id", | |
"description": "The ID of the fulfillment the label is associated with." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the label was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the label was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the label was deleted." | |
} | |
} | |
}, | |
"AdminFulfillmentProvider": { | |
"type": "object", | |
"description": "The fulfillment provider's details.", | |
"x-schemaName": "AdminFulfillmentProvider", | |
"required": [ | |
"id", | |
"is_enabled" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The provider's ID." | |
}, | |
"is_enabled": { | |
"type": "boolean", | |
"title": "is_enabled", | |
"description": "The provider's is enabled." | |
} | |
} | |
}, | |
"AdminFulfillmentProviderListResponse": { | |
"type": "object", | |
"description": "The paginated list of fulfillment providers.", | |
"x-schemaName": "AdminFulfillmentProviderListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"fulfillment_providers" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total count of items." | |
}, | |
"fulfillment_providers": { | |
"type": "array", | |
"description": "The list of fulfillment providers.", | |
"items": { | |
"$ref": "#/components/schemas/AdminFulfillmentProvider" | |
} | |
} | |
} | |
}, | |
"AdminFulfillmentResponse": { | |
"type": "object", | |
"description": "A fulfillment's details.", | |
"x-schemaName": "AdminFulfillmentResponse", | |
"required": [ | |
"fulfillment" | |
], | |
"properties": { | |
"fulfillment": { | |
"$ref": "#/components/schemas/AdminFulfillment" | |
} | |
} | |
}, | |
"AdminFulfillmentSet": { | |
"type": "object", | |
"description": "The service zone's fulfillment set.", | |
"x-schemaName": "AdminFulfillmentSet", | |
"required": [ | |
"id", | |
"name", | |
"type", | |
"location", | |
"service_zones", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The fulfillment set's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The fulfillment set's name." | |
}, | |
"type": { | |
"type": "string", | |
"title": "type", | |
"description": "The fulfillment set's type." | |
}, | |
"location": { | |
"$ref": "#/components/schemas/AdminStockLocation" | |
}, | |
"service_zones": { | |
"type": "array", | |
"description": "The fulfillment set's service zones.", | |
"items": { | |
"$ref": "#/components/schemas/AdminServiceZone" | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The fulfillment set's created at." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The fulfillment set's updated at." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The fulfillment set's deleted at." | |
} | |
} | |
}, | |
"AdminFulfillmentSetDeleteResponse": { | |
"type": "object", | |
"description": "The deletion details.", | |
"x-schemaName": "AdminFulfillmentSetDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The fulfillment set's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "fulfillment_set" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the fulfillment set was deleted." | |
} | |
} | |
}, | |
"AdminFulfillmentSetResponse": { | |
"type": "object", | |
"description": "The fulfillment set's details.", | |
"x-schemaName": "AdminFulfillmentSetResponse", | |
"required": [ | |
"fulfillment_set" | |
], | |
"properties": { | |
"fulfillment_set": { | |
"$ref": "#/components/schemas/AdminFulfillmentSet" | |
} | |
} | |
}, | |
"AdminGeoZone": { | |
"type": "object", | |
"description": "The geo zone's geo zones.", | |
"x-schemaName": "AdminGeoZone", | |
"required": [ | |
"id", | |
"type", | |
"country_code", | |
"province_code", | |
"city", | |
"postal_expression", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The geo zone's ID." | |
}, | |
"type": { | |
"type": "string", | |
"description": "The geo zone's type.", | |
"enum": [ | |
"country", | |
"province", | |
"city", | |
"zip" | |
] | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The geo zone's country code." | |
}, | |
"province_code": { | |
"type": "string", | |
"title": "province_code", | |
"description": "The geo zone's province code." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The geo zone's city." | |
}, | |
"postal_expression": { | |
"type": "object", | |
"description": "The geo zone's postal expression." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The geo zone's created at." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The geo zone's updated at." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The geo zone's deleted at." | |
} | |
} | |
}, | |
"AdminImportProductRequest": { | |
"type": "object", | |
"description": "The import's details.", | |
"x-schemaName": "AdminImportProductRequest", | |
"required": [ | |
"file" | |
], | |
"properties": { | |
"file": { | |
"type": "object", | |
"description": "A File to upload.", | |
"externalDocs": { | |
"url": "https://developer.mozilla.org/en-US/docs/Web/API/File", | |
"description": "Learn more about the File API" | |
}, | |
"title": "file" | |
} | |
} | |
}, | |
"AdminImportProductResponse": { | |
"type": "object", | |
"description": "The import process's details.", | |
"x-schemaName": "AdminImportProductResponse", | |
"required": [ | |
"transaction_id", | |
"summary" | |
], | |
"properties": { | |
"transaction_id": { | |
"type": "string", | |
"title": "transaction_id", | |
"description": "The ID of the workflow execution's transaction. This is useful to confirm the import using the `/admin/products/:transaction-id/import` API route." | |
}, | |
"summary": { | |
"type": "object", | |
"description": "The import's summary.", | |
"required": [ | |
"toCreate", | |
"toUpdate" | |
], | |
"properties": { | |
"toCreate": { | |
"type": "number", | |
"title": "toCreate", | |
"description": "The number of products that will be created by this import." | |
}, | |
"toUpdate": { | |
"type": "number", | |
"title": "toUpdate", | |
"description": "The number of products that will be updated by this import." | |
} | |
} | |
} | |
} | |
}, | |
"AdminInventoryItem": { | |
"type": "object", | |
"description": "The reservation's inventory item.", | |
"x-schemaName": "AdminInventoryItem", | |
"required": [ | |
"id", | |
"requires_shipping" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The inventory item's ID." | |
}, | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The inventory item's sku." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The inventory item's origin country." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The inventory item's hs code." | |
}, | |
"requires_shipping": { | |
"type": "boolean", | |
"title": "requires_shipping", | |
"description": "The inventory item's requires shipping." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The inventory item's mid code." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The inventory item's material." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The inventory item's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The inventory item's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The inventory item's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The inventory item's width." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The inventory item's title." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The inventory item's description." | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The inventory item's thumbnail." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The inventory item's metadata." | |
}, | |
"location_levels": { | |
"type": "array", | |
"description": "The inventory item's location levels.", | |
"items": { | |
"$ref": "#/components/schemas/AdminInventoryLevel" | |
} | |
} | |
} | |
}, | |
"AdminInventoryItemResponse": { | |
"type": "object", | |
"description": "The inventory item's details.", | |
"x-schemaName": "AdminInventoryItemResponse", | |
"required": [ | |
"inventory_item" | |
], | |
"properties": { | |
"inventory_item": { | |
"$ref": "#/components/schemas/AdminInventoryItem" | |
} | |
} | |
}, | |
"AdminInventoryLevel": { | |
"type": "object", | |
"description": "The location level's location levels.", | |
"x-schemaName": "AdminInventoryLevel", | |
"required": [ | |
"id", | |
"created_at", | |
"updated_at", | |
"deleted_at", | |
"inventory_item_id", | |
"location_id", | |
"stocked_quantity", | |
"reserved_quantity", | |
"incoming_quantity", | |
"metadata", | |
"available_quantity" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The location level's ID." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The location level's created at." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The location level's updated at." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The location level's deleted at." | |
}, | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The location level's inventory item id." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The location level's location id." | |
}, | |
"stocked_quantity": { | |
"type": "number", | |
"title": "stocked_quantity", | |
"description": "The location level's stocked quantity." | |
}, | |
"reserved_quantity": { | |
"type": "number", | |
"title": "reserved_quantity", | |
"description": "The location level's reserved quantity." | |
}, | |
"incoming_quantity": { | |
"type": "number", | |
"title": "incoming_quantity", | |
"description": "The location level's incoming quantity." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The location level's metadata." | |
}, | |
"inventory_item": { | |
"type": "object" | |
}, | |
"available_quantity": { | |
"type": "number", | |
"title": "available_quantity", | |
"description": "The location level's available quantity." | |
} | |
} | |
}, | |
"AdminInvite": { | |
"type": "object", | |
"description": "The invite's details.", | |
"x-schemaName": "AdminInvite", | |
"required": [ | |
"id", | |
"email", | |
"accepted", | |
"token" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The invite's ID." | |
}, | |
"email": { | |
"type": "string", | |
"title": "email", | |
"description": "The invite's email.", | |
"format": "email" | |
}, | |
"accepted": { | |
"type": "boolean", | |
"title": "accepted", | |
"description": "Whether the invite has been accepted." | |
}, | |
"token": { | |
"type": "string", | |
"title": "token", | |
"description": "The invite's token." | |
}, | |
"expires_at": { | |
"type": "string", | |
"title": "expires_at", | |
"description": "The invite's expiry date.", | |
"format": "date-time" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The invite's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the invite was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the invite was updated." | |
} | |
} | |
}, | |
"AdminInviteResponse": { | |
"type": "object", | |
"description": "The invite's details.", | |
"x-schemaName": "AdminInviteResponse", | |
"required": [ | |
"invite" | |
], | |
"properties": { | |
"invite": { | |
"$ref": "#/components/schemas/AdminInvite" | |
} | |
} | |
}, | |
"AdminLinkPriceListProducts": { | |
"type": "object", | |
"description": "The products removal details.", | |
"properties": { | |
"remove": { | |
"type": "array", | |
"description": "The products to remove from the price list.", | |
"items": { | |
"type": "string", | |
"title": "remove", | |
"description": "The ID of a product." | |
} | |
} | |
}, | |
"x-schemaName": "AdminLinkPriceListProducts" | |
}, | |
"AdminNotification": { | |
"type": "object", | |
"description": "The notification's details.", | |
"x-schemaName": "AdminNotification", | |
"required": [ | |
"id", | |
"to", | |
"channel", | |
"template", | |
"provider_id", | |
"created_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The notification's ID." | |
}, | |
"to": { | |
"type": "string", | |
"title": "to", | |
"description": "Where to send the notification to. For example, if `channel` is `email`, this can be an email number." | |
}, | |
"channel": { | |
"type": "string", | |
"title": "channel", | |
"description": "Through which channel is the notification sent through.", | |
"example": "email" | |
}, | |
"template": { | |
"type": "string", | |
"title": "template", | |
"description": "The ID of the template in a third-party service used as the notification's shape." | |
}, | |
"data": { | |
"type": "object", | |
"description": "Data payload to send with the notification." | |
}, | |
"trigger_type": { | |
"type": "string", | |
"title": "trigger_type", | |
"description": "What triggered this notification.", | |
"example": "order.created" | |
}, | |
"resource_id": { | |
"type": "string", | |
"title": "resource_id", | |
"description": "The ID of the associated resource. For example, if the notification was triggered because an order was created, this would be the ID of the order." | |
}, | |
"resource_type": { | |
"type": "string", | |
"title": "resource_type", | |
"description": "The type of the resource that triggered the notification.", | |
"example": "order" | |
}, | |
"receiver_id": { | |
"type": "string", | |
"title": "receiver_id", | |
"description": "The ID of the user or customer that's receiving this notification." | |
}, | |
"original_notification_id": { | |
"type": "string", | |
"title": "original_notification_id", | |
"description": "The ID of the original notification, if this notification is resent." | |
}, | |
"external_id": { | |
"type": "string", | |
"title": "external_id", | |
"description": "The ID of the notification in an external or third-party system." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the provider used to send the notification." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the notification was created." | |
} | |
} | |
}, | |
"AdminNotificationListResponse": { | |
"type": "object", | |
"description": "The paginated list of notifications.", | |
"x-schemaName": "AdminNotificationListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"notifications" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total count of items." | |
}, | |
"notifications": { | |
"type": "array", | |
"description": "The list of notifications.", | |
"items": { | |
"$ref": "#/components/schemas/AdminNotification" | |
} | |
} | |
} | |
}, | |
"AdminNotificationResponse": { | |
"type": "object", | |
"description": "The notification's details.", | |
"x-schemaName": "AdminNotificationResponse", | |
"required": [ | |
"notification" | |
], | |
"properties": { | |
"notification": { | |
"$ref": "#/components/schemas/AdminNotification" | |
} | |
} | |
}, | |
"AdminOrder": { | |
"type": "object", | |
"description": "The order's details.", | |
"x-schemaName": "AdminOrder", | |
"required": [ | |
"payment_collections", | |
"items", | |
"shipping_methods", | |
"currency_code", | |
"id", | |
"version", | |
"region_id", | |
"customer_id", | |
"sales_channel_id", | |
"email", | |
"payment_status", | |
"fulfillment_status", | |
"summary", | |
"created_at", | |
"updated_at", | |
"original_item_total", | |
"original_item_subtotal", | |
"original_item_tax_total", | |
"item_total", | |
"item_subtotal", | |
"item_tax_total", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"gift_card_total", | |
"gift_card_tax_total", | |
"shipping_total", | |
"shipping_subtotal", | |
"shipping_tax_total", | |
"original_shipping_total", | |
"original_shipping_subtotal", | |
"original_shipping_tax_total" | |
], | |
"properties": { | |
"payment_collections": { | |
"type": "array", | |
"description": "The order's payment collections.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPaymentCollection" | |
} | |
}, | |
"fulfillments": { | |
"type": "array", | |
"description": "The order's fulfillments.", | |
"items": { | |
"$ref": "#/components/schemas/AdminOrderFulfillment" | |
} | |
}, | |
"sales_channel": { | |
"$ref": "#/components/schemas/AdminSalesChannel" | |
}, | |
"customer": { | |
"$ref": "#/components/schemas/AdminCustomer" | |
}, | |
"shipping_address": { | |
"$ref": "#/components/schemas/AdminOrderAddress" | |
}, | |
"billing_address": { | |
"$ref": "#/components/schemas/AdminOrderAddress" | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The order's ID." | |
}, | |
"version": { | |
"type": "number", | |
"title": "version", | |
"description": "The order's version." | |
}, | |
"region_id": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of the region associated with the order." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "The ID of the customer that placed the order." | |
}, | |
"sales_channel_id": { | |
"type": "string", | |
"title": "sales_channel_id", | |
"description": "The ID of the sales channel the order is placed in." | |
}, | |
"email": { | |
"type": "string", | |
"title": "email", | |
"description": "The email of the customer that placed the order.", | |
"format": "email" | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The order's currency code." | |
}, | |
"display_id": { | |
"type": "number", | |
"title": "display_id", | |
"description": "The order's display ID." | |
}, | |
"items": { | |
"type": "array", | |
"description": "The order's items.", | |
"items": { | |
"$ref": "#/components/schemas/AdminOrderLineItem" | |
} | |
}, | |
"shipping_methods": { | |
"type": "array", | |
"description": "The order's shipping methods.", | |
"items": { | |
"$ref": "#/components/schemas/AdminOrderShippingMethod" | |
} | |
}, | |
"payment_status": { | |
"type": "string", | |
"description": "The order's payment status.", | |
"enum": [ | |
"canceled", | |
"not_paid", | |
"awaiting", | |
"authorized", | |
"partially_authorized", | |
"captured", | |
"partially_captured", | |
"partially_refunded", | |
"refunded", | |
"requires_action" | |
] | |
}, | |
"fulfillment_status": { | |
"type": "string", | |
"description": "The order's fulfillment status.", | |
"enum": [ | |
"canceled", | |
"not_fulfilled", | |
"partially_fulfilled", | |
"fulfilled", | |
"partially_shipped", | |
"shipped", | |
"partially_delivered", | |
"delivered" | |
] | |
}, | |
"transactions": { | |
"type": "array", | |
"description": "The order's transactions.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderTransaction" | |
} | |
}, | |
"summary": { | |
"$ref": "#/components/schemas/BaseOrderSummary" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The order's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the order was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the order was updated." | |
}, | |
"original_item_total": { | |
"type": "number", | |
"title": "original_item_total", | |
"description": "The total of the order's items including taxes, excluding promotions." | |
}, | |
"original_item_subtotal": { | |
"type": "number", | |
"title": "original_item_subtotal", | |
"description": "The total of the order's items excluding taxes, including promotions." | |
}, | |
"original_item_tax_total": { | |
"type": "number", | |
"title": "original_item_tax_total", | |
"description": "The tax total of the order's items excluding promotions." | |
}, | |
"item_total": { | |
"type": "number", | |
"title": "item_total", | |
"description": "The total of the order's items including taxes and promotions." | |
}, | |
"item_subtotal": { | |
"type": "number", | |
"title": "item_subtotal", | |
"description": "The total of the order's items excluding taxes, including promotions." | |
}, | |
"item_tax_total": { | |
"type": "number", | |
"title": "item_tax_total", | |
"description": "The tax total of the order's items including promotions." | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The order's total excluding promotions, including taxes." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The order's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The order's tax total, excluding promotions." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The order's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The order's total excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The order's tax total including promotions." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The order's discount or promotions total." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The tax total of order's discount or promotion." | |
}, | |
"gift_card_total": { | |
"type": "number", | |
"title": "gift_card_total", | |
"description": "The order's gift card total." | |
}, | |
"gift_card_tax_total": { | |
"type": "number", | |
"title": "gift_card_tax_total", | |
"description": "The tax total of the order's gift card." | |
}, | |
"shipping_total": { | |
"type": "number", | |
"title": "shipping_total", | |
"description": "The order's shipping total including taxes and promotions." | |
}, | |
"shipping_subtotal": { | |
"type": "number", | |
"title": "shipping_subtotal", | |
"description": "The order's shipping total excluding taxes, including promotions." | |
}, | |
"shipping_tax_total": { | |
"type": "number", | |
"title": "shipping_tax_total", | |
"description": "The tax total of the order's shipping." | |
}, | |
"original_shipping_total": { | |
"type": "number", | |
"title": "original_shipping_total", | |
"description": "The order's shipping total including taxes, excluding promotions." | |
}, | |
"original_shipping_subtotal": { | |
"type": "number", | |
"title": "original_shipping_subtotal", | |
"description": "The order's shipping total excluding taxes, including promotions." | |
}, | |
"original_shipping_tax_total": { | |
"type": "number", | |
"title": "original_shipping_tax_total", | |
"description": "The tax total of the order's shipping excluding promotions." | |
} | |
} | |
}, | |
"AdminOrderAddress": { | |
"type": "object", | |
"description": "An order address.", | |
"x-schemaName": "AdminOrderAddress", | |
"required": [ | |
"id", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The address's ID." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "The ID of the customer this address belongs to." | |
}, | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The address's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The address's last name." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The address's phone." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code.", | |
"example": "us" | |
}, | |
"country": { | |
"$ref": "#/components/schemas/AdminRegionCountry" | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The address's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the address was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the address was updated." | |
} | |
} | |
}, | |
"AdminOrderChange": { | |
"type": "object", | |
"description": "The order change's details.", | |
"x-schemaName": "AdminOrderChange", | |
"required": [ | |
"order", | |
"claim", | |
"return_order", | |
"exchange", | |
"actions", | |
"status", | |
"id", | |
"version", | |
"metadata", | |
"created_at", | |
"updated_at", | |
"order_id", | |
"canceled_at", | |
"return_id", | |
"exchange_id", | |
"claim_id", | |
"requested_by", | |
"requested_at", | |
"confirmed_by", | |
"confirmed_at", | |
"declined_by", | |
"declined_reason", | |
"declined_at", | |
"canceled_by" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The order change's ID." | |
}, | |
"version": { | |
"type": "number", | |
"title": "version", | |
"description": "The order change's version. This will be the order's version when the change is applied." | |
}, | |
"change_type": { | |
"type": "string", | |
"description": "The order change's type.", | |
"enum": [ | |
"return", | |
"exchange", | |
"claim", | |
"edit" | |
] | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this change applies on." | |
}, | |
"return_id": { | |
"type": "string", | |
"title": "return_id", | |
"description": "The ID of the associated return." | |
}, | |
"exchange_id": { | |
"type": "string", | |
"title": "exchange_id", | |
"description": "The ID of the associated exchange." | |
}, | |
"claim_id": { | |
"type": "string", | |
"title": "claim_id", | |
"description": "The ID of the associated claim." | |
}, | |
"order": { | |
"$ref": "#/components/schemas/AdminOrder" | |
}, | |
"return_order": { | |
"$ref": "#/components/schemas/AdminReturn" | |
}, | |
"exchange": { | |
"$ref": "#/components/schemas/AdminExchange" | |
}, | |
"claim": { | |
"$ref": "#/components/schemas/AdminClaim" | |
}, | |
"actions": { | |
"type": "array", | |
"description": "The order change's actions.", | |
"items": { | |
"$ref": "#/components/schemas/AdminOrderChangeAction" | |
} | |
}, | |
"status": { | |
"type": "string", | |
"description": "The order change's status.", | |
"enum": [ | |
"canceled", | |
"requested", | |
"pending", | |
"confirmed", | |
"declined" | |
] | |
}, | |
"requested_by": { | |
"type": "string", | |
"title": "requested_by", | |
"description": "The ID of the user that requested the change." | |
}, | |
"requested_at": { | |
"type": "string", | |
"title": "requested_at", | |
"description": "The date the order change was requested.", | |
"format": "date-time" | |
}, | |
"confirmed_by": { | |
"type": "string", | |
"title": "confirmed_by", | |
"description": "The ID of the user that confirmed the order change." | |
}, | |
"confirmed_at": { | |
"type": "string", | |
"title": "confirmed_at", | |
"description": "The date the order change was confirmed.", | |
"format": "date-time" | |
}, | |
"declined_by": { | |
"type": "string", | |
"title": "declined_by", | |
"description": "The ID of the user that declined the order change." | |
}, | |
"declined_reason": { | |
"type": "string", | |
"title": "declined_reason", | |
"description": "The reason the order change was declined." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The order change's metadata, can hold custom key-value pairs." | |
}, | |
"declined_at": { | |
"type": "string", | |
"title": "declined_at", | |
"description": "The date the order change was declined.", | |
"format": "date-time" | |
}, | |
"canceled_by": { | |
"type": "string", | |
"title": "canceled_by", | |
"description": "The ID of the user that canceled the order change." | |
}, | |
"canceled_at": { | |
"type": "string", | |
"title": "canceled_at", | |
"description": "The date the order change was canceled.", | |
"format": "date-time" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the order change was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the order change was updated." | |
} | |
} | |
}, | |
"AdminOrderChangeAction": { | |
"type": "object", | |
"description": "The order change action's details.", | |
"x-schemaName": "AdminOrderChangeAction", | |
"required": [ | |
"order_change", | |
"order", | |
"id", | |
"created_at", | |
"updated_at", | |
"order_id", | |
"internal_note", | |
"return_id", | |
"exchange_id", | |
"claim_id", | |
"order_change_id", | |
"reference", | |
"reference_id", | |
"action", | |
"details" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The action's ID." | |
}, | |
"order_change_id": { | |
"type": "string", | |
"title": "order_change_id", | |
"description": "The ID of the order change that the action belongs to." | |
}, | |
"order_change": { | |
"type": "object" | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order the associated change is for." | |
}, | |
"return_id": { | |
"type": "string", | |
"title": "return_id", | |
"description": "The ID of the associated return." | |
}, | |
"claim_id": { | |
"type": "string", | |
"title": "claim_id", | |
"description": "The ID of the associated claim." | |
}, | |
"exchange_id": { | |
"type": "string", | |
"title": "exchange_id", | |
"description": "The ID of the associated exchange." | |
}, | |
"order": { | |
"$ref": "#/components/schemas/AdminOrder" | |
}, | |
"reference": { | |
"type": "string", | |
"title": "reference", | |
"description": "The name of the table this action applies on.", | |
"enum": [ | |
"claim", | |
"exchange", | |
"return", | |
"order_shipping_method" | |
] | |
}, | |
"reference_id": { | |
"type": "string", | |
"title": "reference_id", | |
"description": "The ID of the record in the referenced table." | |
}, | |
"action": { | |
"type": "string", | |
"description": "The applied action.", | |
"enum": [ | |
"CANCEL_RETURN_ITEM", | |
"FULFILL_ITEM", | |
"DELIVER_ITEM", | |
"CANCEL_ITEM_FULFILLMENT", | |
"ITEM_ADD", | |
"ITEM_REMOVE", | |
"ITEM_UPDATE", | |
"RECEIVE_DAMAGED_RETURN_ITEM", | |
"RECEIVE_RETURN_ITEM", | |
"RETURN_ITEM", | |
"SHIPPING_ADD", | |
"SHIPPING_REMOVE", | |
"SHIP_ITEM", | |
"WRITE_OFF_ITEM", | |
"REINSTATE_ITEM" | |
] | |
}, | |
"details": { | |
"type": "object", | |
"description": "The action's details.", | |
"example": { | |
"reference_id": 123, | |
"quantity": 1 | |
} | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note that's viewed only by admin users." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the action was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the action was updated." | |
} | |
} | |
}, | |
"AdminOrderChangesResponse": { | |
"type": "object", | |
"description": "The details of an order's changes.", | |
"x-schemaName": "AdminOrderChangesResponse", | |
"required": [ | |
"order_changes" | |
], | |
"properties": { | |
"order_changes": { | |
"type": "array", | |
"description": "An order's changes.", | |
"items": { | |
"$ref": "#/components/schemas/AdminOrderChange" | |
} | |
} | |
} | |
}, | |
"AdminOrderEditPreviewResponse": { | |
"type": "object", | |
"description": "The preview of an order edit.", | |
"x-schemaName": "AdminOrderEditPreviewResponse", | |
"required": [ | |
"order_preview" | |
], | |
"properties": { | |
"order_preview": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
} | |
} | |
}, | |
"AdminOrderEditResponse": { | |
"type": "object", | |
"description": "An order edit's details.", | |
"x-schemaName": "AdminOrderEditResponse", | |
"required": [ | |
"order_change" | |
], | |
"properties": { | |
"order_change": { | |
"$ref": "#/components/schemas/AdminOrderChange" | |
} | |
} | |
}, | |
"AdminOrderFulfillment": { | |
"type": "object", | |
"description": "The fulfillment's details.", | |
"x-schemaName": "AdminOrderFulfillment", | |
"required": [ | |
"id", | |
"location_id", | |
"packed_at", | |
"shipped_at", | |
"delivered_at", | |
"canceled_at", | |
"requires_shipping", | |
"data", | |
"provider_id", | |
"shipping_option_id", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The fulfillment's ID." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the location the items are fulfilled from." | |
}, | |
"packed_at": { | |
"type": "string", | |
"title": "packed_at", | |
"description": "The date the items were packed.", | |
"format": "date-time" | |
}, | |
"shipped_at": { | |
"type": "string", | |
"title": "shipped_at", | |
"description": "The date the items were shipped.", | |
"format": "date-time" | |
}, | |
"delivered_at": { | |
"type": "string", | |
"title": "delivered_at", | |
"description": "The date the items were delivered.", | |
"format": "date-time" | |
}, | |
"canceled_at": { | |
"type": "string", | |
"title": "canceled_at", | |
"description": "The date the items were canceled.", | |
"format": "date-time" | |
}, | |
"data": { | |
"type": "object", | |
"description": "Data useful for the fulfillment provider handling it. This is taken from the associated shipping option.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property" | |
} | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the fulfillment provider used to handle the fulfillment." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the associated shipping option." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The fulfillment's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the fulfillment was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the fulfillment was updated." | |
}, | |
"requires_shipping": { | |
"type": "boolean", | |
"title": "requires_shipping", | |
"description": "Whether the fulfillment requires shipping." | |
} | |
} | |
}, | |
"AdminOrderItem": { | |
"type": "object", | |
"description": "The order item's details.", | |
"x-schemaName": "AdminOrderItem", | |
"required": [ | |
"order_id", | |
"item_id", | |
"version", | |
"history", | |
"item" | |
], | |
"properties": { | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this item belongs to." | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "item_id", | |
"description": "The ID of the associated line item." | |
}, | |
"version": { | |
"type": "number", | |
"title": "version", | |
"description": "The order item's version." | |
}, | |
"history": { | |
"type": "object", | |
"description": "The order item's history.", | |
"required": [ | |
"version" | |
], | |
"properties": { | |
"version": { | |
"type": "object", | |
"description": "The version changes of the item.", | |
"required": [ | |
"from", | |
"to" | |
], | |
"properties": { | |
"from": { | |
"type": "number", | |
"title": "from", | |
"description": "The original version." | |
}, | |
"to": { | |
"type": "number", | |
"title": "to", | |
"description": "The new version." | |
} | |
} | |
} | |
} | |
}, | |
"item": { | |
"$ref": "#/components/schemas/AdminOrderLineItem" | |
} | |
} | |
}, | |
"AdminOrderLineItem": { | |
"type": "object", | |
"description": "The item's details.", | |
"x-schemaName": "AdminOrderLineItem", | |
"required": [ | |
"title", | |
"id", | |
"metadata", | |
"created_at", | |
"updated_at", | |
"item_total", | |
"item_subtotal", | |
"item_tax_total", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"subtitle", | |
"thumbnail", | |
"variant_id", | |
"product_id", | |
"product_title", | |
"product_description", | |
"product_subtitle", | |
"product_type_id", | |
"product_type", | |
"product_collection", | |
"product_handle", | |
"variant_sku", | |
"variant_barcode", | |
"variant_title", | |
"variant_option_values", | |
"requires_shipping", | |
"is_discountable", | |
"is_tax_inclusive", | |
"unit_price", | |
"quantity", | |
"detail", | |
"refundable_total", | |
"refundable_total_per_unit" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The item's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The item's title." | |
}, | |
"subtitle": { | |
"type": "string", | |
"title": "subtitle", | |
"description": "The item's subtitle." | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The URL of the item's thumbnail." | |
}, | |
"variant": { | |
"$ref": "#/components/schemas/AdminProductVariant" | |
}, | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the associated variant." | |
}, | |
"product": { | |
"$ref": "#/components/schemas/AdminProduct" | |
}, | |
"product_id": { | |
"type": "string", | |
"title": "product_id", | |
"description": "The ID of the associated product." | |
}, | |
"product_title": { | |
"type": "string", | |
"title": "product_title", | |
"description": "The item's product title." | |
}, | |
"product_description": { | |
"type": "string", | |
"title": "product_description", | |
"description": "The item's product description." | |
}, | |
"product_subtitle": { | |
"type": "string", | |
"title": "product_subtitle", | |
"description": "The item's product subtitle." | |
}, | |
"product_type": { | |
"type": "string", | |
"title": "product_type", | |
"description": "The item's product type." | |
}, | |
"product_collection": { | |
"type": "string", | |
"title": "product_collection", | |
"description": "The ID of the collection the item's product belongs to." | |
}, | |
"product_handle": { | |
"type": "string", | |
"title": "product_handle", | |
"description": "The item's product handle." | |
}, | |
"variant_sku": { | |
"type": "string", | |
"title": "variant_sku", | |
"description": "The item's variant SKU." | |
}, | |
"variant_barcode": { | |
"type": "string", | |
"title": "variant_barcode", | |
"description": "The item's variant barcode." | |
}, | |
"variant_title": { | |
"type": "string", | |
"title": "variant_title", | |
"description": "The item's variant title." | |
}, | |
"variant_option_values": { | |
"type": "object", | |
"description": "The values of the item variant's options.", | |
"example": { | |
"Color": "Blue" | |
} | |
}, | |
"requires_shipping": { | |
"type": "boolean", | |
"title": "requires_shipping", | |
"description": "Whether the item requires shipping." | |
}, | |
"is_discountable": { | |
"type": "boolean", | |
"title": "is_discountable", | |
"description": "Whether the item is discountable." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether the item is tax inclusive." | |
}, | |
"compare_at_unit_price": { | |
"type": "number", | |
"title": "compare_at_unit_price", | |
"description": "The original price of the item before a promotion or sale." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"tax_lines": { | |
"type": "array", | |
"description": "The item's tax lines.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderLineItemTaxLine" | |
} | |
}, | |
"adjustments": { | |
"type": "array", | |
"description": "The item's adjustments.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderLineItemAdjustment" | |
} | |
}, | |
"detail": { | |
"type": "object" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the item was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the item was updated." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The item's total including taxes, excluding promotions." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The item's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The total taxes of the item, excluding promotions." | |
}, | |
"item_total": { | |
"type": "number", | |
"title": "item_total", | |
"description": "The total taxes of the item, including promotions." | |
}, | |
"item_subtotal": { | |
"type": "number", | |
"title": "item_subtotal", | |
"description": "The item's total excluding taxes, including promotions." | |
}, | |
"item_tax_total": { | |
"type": "number", | |
"title": "item_tax_total", | |
"description": "The total taxes of the item, including promotions." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The item's total, including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The item's subtotal excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The tax total of the item including promotions." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The total discount amount of the item." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The total taxes applied on the discounted amount." | |
}, | |
"refundable_total": { | |
"type": "number", | |
"title": "refundable_total", | |
"description": "The total refundable amount of the item's total." | |
}, | |
"refundable_total_per_unit": { | |
"type": "number", | |
"title": "refundable_total_per_unit", | |
"description": "The total refundable amount of the item's total for a single quantity." | |
}, | |
"product_type_id": { | |
"type": "string", | |
"title": "product_type_id", | |
"description": "The ID of the associated product's type." | |
} | |
} | |
}, | |
"AdminOrderPreview": { | |
"type": "object", | |
"description": "A preview of an order if a change, such as exchange, return, edit, or claim is applied on it.", | |
"x-schemaName": "AdminOrderPreview", | |
"required": [ | |
"return_requested_total", | |
"order_change", | |
"currency_code", | |
"id", | |
"version", | |
"region_id", | |
"customer_id", | |
"sales_channel_id", | |
"email", | |
"payment_collections", | |
"payment_status", | |
"fulfillment_status", | |
"summary", | |
"created_at", | |
"updated_at", | |
"original_item_total", | |
"original_item_subtotal", | |
"original_item_tax_total", | |
"item_total", | |
"item_subtotal", | |
"item_tax_total", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"gift_card_total", | |
"gift_card_tax_total", | |
"shipping_total", | |
"shipping_subtotal", | |
"shipping_tax_total", | |
"original_shipping_total", | |
"original_shipping_subtotal", | |
"original_shipping_tax_total" | |
], | |
"properties": { | |
"return_requested_total": { | |
"type": "number", | |
"title": "return_requested_total", | |
"description": "The total of the requested return." | |
}, | |
"order_change": { | |
"$ref": "#/components/schemas/AdminOrderChange" | |
}, | |
"items": { | |
"type": "array", | |
"description": "The order's items.", | |
"items": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "An order's item.", | |
"x-schemaName": "BaseOrderLineItem", | |
"required": [ | |
"id", | |
"title", | |
"subtitle", | |
"thumbnail", | |
"variant_id", | |
"product_id", | |
"product_title", | |
"product_description", | |
"product_subtitle", | |
"product_type", | |
"product_collection", | |
"product_handle", | |
"variant_sku", | |
"variant_barcode", | |
"variant_title", | |
"variant_option_values", | |
"requires_shipping", | |
"is_discountable", | |
"is_tax_inclusive", | |
"unit_price", | |
"quantity", | |
"detail", | |
"created_at", | |
"updated_at", | |
"metadata", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"item_total", | |
"item_subtotal", | |
"item_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"refundable_total", | |
"refundable_total_per_unit" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The item's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The item's title." | |
}, | |
"subtitle": { | |
"type": "string", | |
"title": "subtitle", | |
"description": "The item's subtitle." | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The URL of the item's thumbnail." | |
}, | |
"variant": { | |
"$ref": "#/components/schemas/BaseProductVariant" | |
}, | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the associated variant." | |
}, | |
"product": { | |
"$ref": "#/components/schemas/AdminProduct" | |
}, | |
"product_id": { | |
"type": "string", | |
"title": "product_id", | |
"description": "The ID of the associated product." | |
}, | |
"product_title": { | |
"type": "string", | |
"title": "product_title", | |
"description": "The title of the item's product." | |
}, | |
"product_description": { | |
"type": "string", | |
"title": "product_description", | |
"description": "The description of the item's product." | |
}, | |
"product_subtitle": { | |
"type": "string", | |
"title": "product_subtitle", | |
"description": "The subtitle of the item's product." | |
}, | |
"product_type": { | |
"type": "string", | |
"title": "product_type", | |
"description": "The ID of type of the item's product." | |
}, | |
"product_collection": { | |
"type": "string", | |
"title": "product_collection", | |
"description": "The ID of collection of the item's product." | |
}, | |
"product_handle": { | |
"type": "string", | |
"title": "product_handle", | |
"description": "The handle of the item's product." | |
}, | |
"variant_sku": { | |
"type": "string", | |
"title": "variant_sku", | |
"description": "The SKU of the item's variant." | |
}, | |
"variant_barcode": { | |
"type": "string", | |
"title": "variant_barcode", | |
"description": "The barcode of the item's variant." | |
}, | |
"variant_title": { | |
"type": "string", | |
"title": "variant_title", | |
"description": "The title of the item's variant." | |
}, | |
"variant_option_values": { | |
"type": "object", | |
"description": "The option values of the item's variant as key-value pairs. The key is the title of an option, and the value is the option's value." | |
}, | |
"requires_shipping": { | |
"type": "boolean", | |
"title": "requires_shipping", | |
"description": "Whether the item requires shipping." | |
}, | |
"is_discountable": { | |
"type": "boolean", | |
"title": "is_discountable", | |
"description": "Whether the item is discountable." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether the item's price includes taxes." | |
}, | |
"compare_at_unit_price": { | |
"type": "number", | |
"title": "compare_at_unit_price", | |
"description": "The original price of the item before a promotion or sale." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"tax_lines": { | |
"type": "array", | |
"description": "The item's tax lines.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderLineItemTaxLine" | |
} | |
}, | |
"adjustments": { | |
"type": "array", | |
"description": "The item's adjustments.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderLineItemAdjustment" | |
} | |
}, | |
"detail": { | |
"$ref": "#/components/schemas/BaseOrderItemDetail" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the item was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the item was updated." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The item's total including taxes, excluding promotions." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The item's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The tax total of the item excluding promotions." | |
}, | |
"item_total": { | |
"type": "number", | |
"title": "item_total", | |
"description": "The item's total for a single unit including taxes and promotions." | |
}, | |
"item_subtotal": { | |
"type": "number", | |
"title": "item_subtotal", | |
"description": "The item's total for a single unit excluding taxes, including promotions." | |
}, | |
"item_tax_total": { | |
"type": "number", | |
"title": "item_tax_total", | |
"description": "The tax total for a single unit of the item including promotions." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The item's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The item's total excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The tax total of the item including promotions." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The total of the item's discount / promotion." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The tax total of the item's discount / promotion" | |
}, | |
"refundable_total": { | |
"type": "number", | |
"title": "refundable_total", | |
"description": "The total refundable amount of the item's total." | |
}, | |
"refundable_total_per_unit": { | |
"type": "number", | |
"title": "refundable_total_per_unit", | |
"description": "The total refundable amount of the item's total for a single unit." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "An order's item.", | |
"properties": { | |
"actions": { | |
"type": "array", | |
"description": "The actions applied on an item.", | |
"items": { | |
"type": "object", | |
"description": "The action's details.", | |
"x-schemaName": "BaseOrderChangeAction" | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"shipping_methods": { | |
"type": "array", | |
"description": "The order's shipping methods.", | |
"items": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"description": "The shipping method's details.", | |
"x-schemaName": "BaseOrderShippingMethod", | |
"required": [ | |
"id", | |
"order_id", | |
"name", | |
"amount", | |
"is_tax_inclusive", | |
"shipping_option_id", | |
"data", | |
"metadata", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping method's ID." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this shipping method belongs to." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The shipping method's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The shipping method's description." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The shipping method's amount." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether the shipping method's amount is tax inclusive." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the shipping option this method was created from." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The data relevant for the fulfillment provider to process this shipment.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/order/concepts#data-property" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The shipping method's metadata, can hold custom key-value pairs." | |
}, | |
"tax_lines": { | |
"type": "array", | |
"description": "The shipping method's tax lines.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderShippingMethodTaxLine" | |
} | |
}, | |
"adjustments": { | |
"type": "array", | |
"description": "The shipping method's adjustments.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderShippingMethodAdjustment" | |
} | |
}, | |
"original_total": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "original_total", | |
"description": "The shipping method's total including taxes, excluding promotions." | |
}, | |
{ | |
"type": "number", | |
"title": "original_total", | |
"description": "The shipping method's total including taxes, excluding promotions." | |
} | |
] | |
}, | |
"original_subtotal": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "original_subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
}, | |
{ | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
} | |
] | |
}, | |
"original_tax_total": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "original_tax_total", | |
"description": "The tax total of the shipping method excluding promotions." | |
}, | |
{ | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The tax total of the shipping method excluding promotions." | |
} | |
] | |
}, | |
"total": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "total", | |
"description": "The shipping method's total including taxes and promotions." | |
}, | |
{ | |
"type": "number", | |
"title": "total", | |
"description": "The shipping method's total including taxes and promotions." | |
} | |
] | |
}, | |
"subtotal": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
}, | |
{ | |
"type": "number", | |
"title": "subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
} | |
] | |
}, | |
"tax_total": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "tax_total", | |
"description": "The tax total of the shipping method including promotions." | |
}, | |
{ | |
"type": "number", | |
"title": "tax_total", | |
"description": "The tax total of the shipping method including promotions." | |
} | |
] | |
}, | |
"discount_total": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "discount_total", | |
"description": "The total of the shipping method's promotion." | |
}, | |
{ | |
"type": "number", | |
"title": "discount_total", | |
"description": "The total of the shipping method's promotion." | |
} | |
] | |
}, | |
"discount_tax_total": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "discount_tax_total", | |
"description": "The tax total of the shipping method's promotion." | |
}, | |
{ | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The shipping method's discount tax total." | |
} | |
] | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping method was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping method was updated." | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"description": "The shipping method's details.", | |
"properties": { | |
"actions": { | |
"type": "array", | |
"description": "The actions applied on the shipping method.", | |
"items": { | |
"type": "object", | |
"description": "The action's details.", | |
"x-schemaName": "BaseOrderChangeAction" | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The order's currency code." | |
}, | |
"version": { | |
"type": "number", | |
"title": "version", | |
"description": "The order's version when this preview is applied." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The order's ID." | |
}, | |
"region_id": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of the order's associated region." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "The ID of the customer that placed the order." | |
}, | |
"sales_channel_id": { | |
"type": "string", | |
"title": "sales_channel_id", | |
"description": "The ID of the sales channel that the order was placed in." | |
}, | |
"email": { | |
"type": "string", | |
"title": "email", | |
"description": "The email of the customer that placed the order.", | |
"format": "email" | |
}, | |
"display_id": { | |
"type": "number", | |
"title": "display_id", | |
"description": "The order's display ID." | |
}, | |
"shipping_address": { | |
"$ref": "#/components/schemas/AdminOrderAddress" | |
}, | |
"billing_address": { | |
"$ref": "#/components/schemas/AdminOrderAddress" | |
}, | |
"payment_collections": { | |
"type": "array", | |
"description": "The order's payment collections.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPaymentCollection" | |
} | |
}, | |
"payment_status": { | |
"type": "string", | |
"description": "The order's payment status.", | |
"enum": [ | |
"canceled", | |
"not_paid", | |
"awaiting", | |
"authorized", | |
"partially_authorized", | |
"captured", | |
"partially_captured", | |
"partially_refunded", | |
"refunded", | |
"requires_action" | |
] | |
}, | |
"fulfillments": { | |
"type": "array", | |
"description": "The order's fulfillments.", | |
"items": { | |
"$ref": "#/components/schemas/AdminOrderFulfillment" | |
} | |
}, | |
"fulfillment_status": { | |
"type": "string", | |
"description": "The order's fulfillment status.", | |
"enum": [ | |
"canceled", | |
"not_fulfilled", | |
"partially_fulfilled", | |
"fulfilled", | |
"partially_shipped", | |
"shipped", | |
"partially_delivered", | |
"delivered" | |
] | |
}, | |
"transactions": { | |
"type": "array", | |
"description": "The order's transactions.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderTransaction" | |
} | |
}, | |
"summary": { | |
"$ref": "#/components/schemas/BaseOrderSummary" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The order's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the order was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the order was updated." | |
}, | |
"original_item_total": { | |
"type": "number", | |
"title": "original_item_total", | |
"description": "The total of the order's items including taxes, excluding promotions." | |
}, | |
"original_item_subtotal": { | |
"type": "number", | |
"title": "original_item_subtotal", | |
"description": "The total of the order's items excluding taxes, including promotions." | |
}, | |
"original_item_tax_total": { | |
"type": "number", | |
"title": "original_item_tax_total", | |
"description": "The tax total of the order's items excluding promotions." | |
}, | |
"item_total": { | |
"type": "number", | |
"title": "item_total", | |
"description": "The total of the order's items including taxes and promotions." | |
}, | |
"item_subtotal": { | |
"type": "number", | |
"title": "item_subtotal", | |
"description": "The total of the order's items excluding taxes, including promotions." | |
}, | |
"item_tax_total": { | |
"type": "number", | |
"title": "item_tax_total", | |
"description": "The tax total of the order's items including promotions." | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The order's total excluding promotions, including taxes." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The order's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The order's tax total, excluding promotions." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The order's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The order's total excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The order's tax total including promotions." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The order's discount or promotions total." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The tax total of order's discount or promotion." | |
}, | |
"gift_card_total": { | |
"type": "number", | |
"title": "gift_card_total", | |
"description": "The order's gift card total." | |
}, | |
"gift_card_tax_total": { | |
"type": "number", | |
"title": "gift_card_tax_total", | |
"description": "The tax total of the order's gift card." | |
}, | |
"shipping_total": { | |
"type": "number", | |
"title": "shipping_total", | |
"description": "The order's shipping total including taxes and promotions." | |
}, | |
"shipping_subtotal": { | |
"type": "number", | |
"title": "shipping_subtotal", | |
"description": "The order's shipping total excluding taxes, including promotions." | |
}, | |
"shipping_tax_total": { | |
"type": "number", | |
"title": "shipping_tax_total", | |
"description": "The tax total of the order's shipping." | |
}, | |
"original_shipping_total": { | |
"type": "number", | |
"title": "original_shipping_total", | |
"description": "The order's shipping total including taxes, excluding promotions." | |
}, | |
"original_shipping_subtotal": { | |
"type": "number", | |
"title": "original_shipping_subtotal", | |
"description": "The order's shipping total excluding taxes, including promotions." | |
}, | |
"original_shipping_tax_total": { | |
"type": "number", | |
"title": "original_shipping_tax_total", | |
"description": "The tax total of the order's shipping excluding promotions." | |
}, | |
"customer": { | |
"$ref": "#/components/schemas/AdminCustomer" | |
}, | |
"sales_channel": { | |
"$ref": "#/components/schemas/AdminSalesChannel" | |
} | |
} | |
}, | |
"AdminOrderPreviewResponse": { | |
"type": "object", | |
"description": "The preview of an order.", | |
"x-schemaName": "AdminOrderPreviewResponse", | |
"required": [ | |
"order" | |
], | |
"properties": { | |
"order": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
} | |
} | |
}, | |
"AdminOrderResponse": { | |
"type": "object", | |
"description": "An order's details.", | |
"x-schemaName": "AdminOrderResponse", | |
"required": [ | |
"order" | |
], | |
"properties": { | |
"order": { | |
"$ref": "#/components/schemas/AdminOrder" | |
} | |
} | |
}, | |
"AdminOrderReturnResponse": { | |
"type": "object", | |
"description": "The order return details.", | |
"x-schemaName": "AdminOrderReturnResponse", | |
"required": [ | |
"order", | |
"return" | |
], | |
"properties": { | |
"order": { | |
"$ref": "#/components/schemas/Order" | |
}, | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
} | |
} | |
}, | |
"AdminOrderShippingMethod": { | |
"type": "object", | |
"description": "The shipping method's details.", | |
"x-schemaName": "AdminOrderShippingMethod", | |
"required": [ | |
"id", | |
"order_id", | |
"name", | |
"amount", | |
"is_tax_inclusive", | |
"shipping_option_id", | |
"data", | |
"metadata", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping method's ID." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order the shipping method belongs to." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The shipping method's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The shipping method's description." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The shipping method's amount." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether the shipping method's amount includes applied taxes." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the shipping option this method was created from." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The shipping method's data, useful for fulfillment provider handling its fulfillment.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The shipping method's metadata, can hold custom key-value pairs." | |
}, | |
"tax_lines": { | |
"type": "array", | |
"description": "The shipping method's tax lines.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderShippingMethodTaxLine" | |
} | |
}, | |
"adjustments": { | |
"type": "array", | |
"description": "The shipping method's adjustments.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderShippingMethodAdjustment" | |
} | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The shipping method's total including taxes, excluding promotions." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The shipping method's total taxes excluding promotions." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The shipping method's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The shipping method's tax total including promotions." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The total discounts applied on the shipping method." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The taxes applied on the discount amount." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping method was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping method was updated." | |
}, | |
"detail": { | |
"$ref": "#/components/schemas/BaseOrderShippingDetail" | |
} | |
} | |
}, | |
"AdminPayment": { | |
"type": "object", | |
"description": "The payment's details.", | |
"x-schemaName": "AdminPayment", | |
"required": [ | |
"id", | |
"amount", | |
"currency_code", | |
"provider_id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment's ID." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The payment's amount." | |
}, | |
"authorized_amount": { | |
"type": "number", | |
"title": "authorized_amount", | |
"description": "The amount authorized of the payment." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The payment's currency code." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the payment provider used to process this payment." | |
}, | |
"cart_id": { | |
"type": "string", | |
"title": "cart_id", | |
"description": "The ID of the associated cart." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the associated order." | |
}, | |
"order_edit_id": { | |
"type": "string", | |
"title": "order_edit_id", | |
"description": "The ID of the associated order edit." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "ID of the associated customer." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The payment's data, useful for processing by the payment provider.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment#whats-a-payment" | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the payment was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the payment was updated." | |
}, | |
"captured_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "captured_at", | |
"description": "The date the payment was captured." | |
}, | |
"canceled_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "canceled_at", | |
"description": "The date the payment was canceled." | |
}, | |
"captured_amount": { | |
"type": "number", | |
"title": "captured_amount", | |
"description": "The captured amount of the payment." | |
}, | |
"refunded_amount": { | |
"type": "number", | |
"title": "captured_amount", | |
"description": "The refunded amount of the payment." | |
}, | |
"captures": { | |
"type": "array", | |
"description": "The details of payment captures.", | |
"items": { | |
"$ref": "#/components/schemas/BaseCapture" | |
} | |
}, | |
"refunds": { | |
"type": "array", | |
"description": "The details of payment refunds.", | |
"items": { | |
"$ref": "#/components/schemas/AdminRefund" | |
} | |
}, | |
"payment_collection": { | |
"type": "object" | |
}, | |
"payment_session": { | |
"$ref": "#/components/schemas/AdminPaymentSession" | |
} | |
} | |
}, | |
"AdminPaymentCollection": { | |
"type": "object", | |
"description": "The payment collection's details.", | |
"x-schemaName": "AdminPaymentCollection", | |
"required": [ | |
"payment_providers", | |
"id", | |
"currency_code", | |
"region_id", | |
"amount", | |
"status" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment collection's ID." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The payment collection's currency code." | |
}, | |
"region_id": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of the region this payment collection is associated with." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The total amount to be paid." | |
}, | |
"authorized_amount": { | |
"type": "number", | |
"title": "authorized_amount", | |
"description": "The total authorized amount of the collection's payments." | |
}, | |
"captured_amount": { | |
"type": "number", | |
"title": "captured_amount", | |
"description": "The total captured amount of the collection's payments." | |
}, | |
"refunded_amount": { | |
"type": "number", | |
"title": "refunded_amount", | |
"description": "The total refunded amount of the collection's payments." | |
}, | |
"completed_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "completed_at", | |
"description": "The date the payment collection was completed." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the payment collection was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the payment collection was updated." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The payment collection's metadata, can hold custom key-value pairs." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The payment collection's status.", | |
"enum": [ | |
"canceled", | |
"not_paid", | |
"awaiting", | |
"authorized", | |
"partially_authorized" | |
] | |
}, | |
"payment_providers": { | |
"type": "array", | |
"description": "The payment provider used to process the collection's payments and sessions.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPaymentProvider" | |
} | |
}, | |
"payment_sessions": { | |
"type": "array", | |
"description": "The payment collection's payment sessions.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPaymentSession" | |
} | |
}, | |
"payments": { | |
"type": "array", | |
"description": "The payment collection's payments.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPayment" | |
} | |
} | |
} | |
}, | |
"AdminPaymentCollectionResponse": { | |
"type": "object", | |
"description": "The payment collection's details.", | |
"x-schemaName": "AdminPaymentCollectionResponse", | |
"required": [ | |
"payment_collection" | |
], | |
"properties": { | |
"payment_collection": { | |
"$ref": "#/components/schemas/AdminPaymentCollection" | |
} | |
} | |
}, | |
"AdminPaymentProvider": { | |
"type": "object", | |
"description": "The payment provider's details.", | |
"x-schemaName": "AdminPaymentProvider", | |
"required": [ | |
"is_enabled", | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment provider's ID." | |
}, | |
"is_enabled": { | |
"type": "boolean", | |
"title": "is_enabled", | |
"description": "Whether the payment provider is enabled." | |
} | |
} | |
}, | |
"AdminPaymentResponse": { | |
"type": "object", | |
"description": "The payment's details.", | |
"x-schemaName": "AdminPaymentResponse", | |
"required": [ | |
"payment" | |
], | |
"properties": { | |
"payment": { | |
"$ref": "#/components/schemas/AdminPayment" | |
} | |
} | |
}, | |
"AdminPaymentSession": { | |
"type": "object", | |
"description": "The payment session's details.", | |
"x-schemaName": "AdminPaymentSession", | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment session's ID." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The payment session's amount." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The payment session's currency code.", | |
"example": "usd" | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the payment provider processing this session." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The payment session's data, useful for the payment provider processing the payment.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment-session#data-property" | |
} | |
}, | |
"context": { | |
"type": "object", | |
"description": "The context around the payment, such as the customer's details.", | |
"example": { | |
"customer": { | |
"id": "cus_123" | |
} | |
} | |
}, | |
"status": { | |
"type": "string", | |
"description": "The payment session's status.", | |
"enum": [ | |
"authorized", | |
"captured", | |
"canceled", | |
"pending", | |
"requires_more", | |
"error" | |
] | |
}, | |
"authorized_at": { | |
"type": "string", | |
"title": "authorized_at", | |
"description": "The date the payment session was authorized.", | |
"format": "date-time" | |
}, | |
"payment_collection": { | |
"type": "object" | |
}, | |
"payment": { | |
"$ref": "#/components/schemas/BasePayment" | |
} | |
}, | |
"required": [ | |
"id", | |
"amount", | |
"currency_code", | |
"provider_id", | |
"data", | |
"status" | |
] | |
}, | |
"AdminPostCancelClaimReqSchema": { | |
"type": "object", | |
"description": "The details of canceling a claim.", | |
"x-schemaName": "AdminPostCancelClaimReqSchema", | |
"properties": { | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether to send the customer a notification about the claim's cancelation." | |
} | |
} | |
}, | |
"AdminPostCancelExchangeReqSchema": { | |
"type": "object", | |
"description": "The details of canceling an exchange.", | |
"x-schemaName": "AdminPostCancelExchangeReqSchema", | |
"properties": { | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether to send a notification to the customer about the exchange's cancelation." | |
} | |
} | |
}, | |
"AdminPostCancelReturnReqSchema": { | |
"type": "object", | |
"description": "The details of canceling a return.", | |
"x-schemaName": "AdminPostCancelReturnReqSchema", | |
"properties": { | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether to send the customer a notification about the return's cancelation." | |
} | |
} | |
}, | |
"AdminPostClaimItemsReqSchema": { | |
"type": "object", | |
"description": "The details of the order items to add to the claim.", | |
"x-schemaName": "AdminPostClaimItemsReqSchema", | |
"properties": { | |
"items": { | |
"type": "array", | |
"description": "The item's details.", | |
"items": { | |
"type": "object", | |
"description": "An item's details.", | |
"required": [ | |
"id", | |
"quantity" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The ID of the order's item." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The quantity of the order's item to add to the claim." | |
}, | |
"reason": { | |
"type": "string", | |
"description": "The reason the item is claimed.", | |
"enum": [ | |
"missing_item", | |
"wrong_item", | |
"production_failure", | |
"other" | |
] | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The item's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note that's only viewed by admin users." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminPostClaimsAddItemsReqSchema": { | |
"type": "object", | |
"description": "The details of the outbound items to add to the claim.", | |
"x-schemaName": "AdminPostClaimsAddItemsReqSchema", | |
"properties": { | |
"items": { | |
"type": "array", | |
"description": "The outbound item's details.", | |
"items": { | |
"type": "object", | |
"description": "An item's details.", | |
"required": [ | |
"variant_id", | |
"quantity" | |
], | |
"properties": { | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the associated product variant." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The quantity to send to the customer." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminPostClaimsItemsActionReqSchema": { | |
"type": "object", | |
"description": "The details to update in the item.", | |
"x-schemaName": "AdminPostClaimsItemsActionReqSchema", | |
"properties": { | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"reason_id": { | |
"type": "string", | |
"title": "reason_id", | |
"description": "The ID of the return reason associated with the item." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note that's only viewed by admin users." | |
} | |
} | |
}, | |
"AdminPostClaimsShippingActionReqSchema": { | |
"type": "object", | |
"description": "The details to update in the shipping method.", | |
"x-schemaName": "AdminPostClaimsShippingActionReqSchema", | |
"properties": { | |
"custom_amount": { | |
"type": "number", | |
"title": "custom_amount", | |
"description": "The shipping method's custom amount." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note only viewed by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The claim's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostClaimsShippingReqSchema": { | |
"type": "object", | |
"description": "The details of the shipping method used to ship outbound items.", | |
"x-schemaName": "AdminPostClaimsShippingReqSchema", | |
"required": [ | |
"shipping_option_id" | |
], | |
"properties": { | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the associated shipping option." | |
}, | |
"custom_amount": { | |
"type": "number", | |
"title": "custom_amount", | |
"description": "Set a custom price for the shipping method." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The shipping method's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note only viewed by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The claim's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostExchangesAddItemsReqSchema": { | |
"type": "object", | |
"description": "The details of outbound items.", | |
"x-schemaName": "AdminPostExchangesAddItemsReqSchema", | |
"properties": { | |
"items": { | |
"type": "array", | |
"description": "The details of outbound items.", | |
"items": { | |
"type": "object", | |
"description": "An item's details.", | |
"required": [ | |
"variant_id", | |
"quantity" | |
], | |
"properties": { | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the associated product variant." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"allow_backorder": { | |
"type": "boolean", | |
"title": "allow_backorder", | |
"description": "Whether the item can be added even if it's not in stock." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminPostExchangesItemsActionReqSchema": { | |
"type": "object", | |
"description": "The details to update in an outbound item.", | |
"x-schemaName": "AdminPostExchangesItemsActionReqSchema", | |
"properties": { | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note only viewed by admin users." | |
} | |
} | |
}, | |
"AdminPostExchangesRequestItemsReturnActionReqSchema": { | |
"type": "object", | |
"description": "The details to update in an inbound (returned) item.", | |
"x-schemaName": "AdminPostExchangesRequestItemsReturnActionReqSchema", | |
"properties": { | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"reason_id": { | |
"type": "string", | |
"title": "reason_id", | |
"description": "The ID of the associated return reason." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The exchange's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostExchangesReturnRequestItemsReqSchema": { | |
"type": "object", | |
"description": "The details of the inbound (return) items.", | |
"x-schemaName": "AdminPostExchangesReturnRequestItemsReqSchema", | |
"properties": { | |
"items": { | |
"type": "array", | |
"description": "The details of the inbound (return) items.", | |
"items": { | |
"type": "object", | |
"description": "An item's details.", | |
"required": [ | |
"id", | |
"quantity" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The ID of the order's item." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The item's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"reason_id": { | |
"type": "string", | |
"title": "reason_id", | |
"description": "The ID of the return reason to associate with the item." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminPostExchangesShippingActionReqSchema": { | |
"type": "object", | |
"description": "The details of the shipping method to update.", | |
"x-schemaName": "AdminPostExchangesShippingActionReqSchema", | |
"properties": { | |
"custom_amount": { | |
"type": "number", | |
"title": "custom_amount", | |
"description": "The shipping method's custom amount." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed by admin users only." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The exchange's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostExchangesShippingReqSchema": { | |
"type": "object", | |
"description": "The outbound shipping method's details.", | |
"x-schemaName": "AdminPostExchangesShippingReqSchema", | |
"required": [ | |
"shipping_option_id" | |
], | |
"properties": { | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the associated shipping option." | |
}, | |
"custom_amount": { | |
"type": "number", | |
"title": "custom_amount", | |
"description": "Set a custom amount for the shipping method." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The shipping method's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed by admin users only." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The exchange's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostOrderClaimsReqSchema": { | |
"type": "object", | |
"description": "The claim's details.", | |
"x-schemaName": "AdminPostOrderClaimsReqSchema", | |
"required": [ | |
"type", | |
"order_id" | |
], | |
"properties": { | |
"type": { | |
"type": "string", | |
"description": "The claim's type.", | |
"enum": [ | |
"refund", | |
"replace" | |
] | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order the claim is created for." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The claim's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"reason_id": { | |
"type": "string", | |
"title": "reason_id", | |
"description": "The ID of the associated return reason." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The claim's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostOrderEditsAddItemsReqSchema": { | |
"type": "object", | |
"description": "The details of items to be edited.", | |
"x-schemaName": "AdminPostOrderEditsAddItemsReqSchema", | |
"properties": { | |
"items": { | |
"type": "array", | |
"description": "The details of items to be edited.", | |
"items": { | |
"type": "object", | |
"description": "An item's details.", | |
"required": [ | |
"variant_id", | |
"quantity" | |
], | |
"properties": { | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the associated product variant." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"allow_backorder": { | |
"type": "boolean", | |
"title": "allow_backorder", | |
"description": "Whether the item can be added even if there's no available invenotory quantity of the variant." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
}, | |
"compare_at_unit_price": { | |
"type": "number", | |
"title": "compare_at_unit_price", | |
"description": "The original price of the item before a promotion or sale." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminPostOrderEditsItemsActionReqSchema": { | |
"type": "object", | |
"description": "The details to update in the item.", | |
"x-schemaName": "AdminPostOrderEditsItemsActionReqSchema", | |
"properties": { | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"compare_at_unit_price": { | |
"type": "number", | |
"title": "compare_at_unit_price", | |
"description": "The original price of the item before a promotion or sale." | |
} | |
} | |
}, | |
"AdminPostOrderEditsReqSchema": { | |
"type": "object", | |
"description": "The order edit's details.", | |
"x-schemaName": "AdminPostOrderEditsReqSchema", | |
"required": [ | |
"order_id" | |
], | |
"properties": { | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this edit is for." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The order edit's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The order edit's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostOrderEditsShippingActionReqSchema": { | |
"type": "object", | |
"description": "The shipping method's details.", | |
"x-schemaName": "AdminPostOrderEditsShippingActionReqSchema", | |
"properties": { | |
"custom_amount": { | |
"type": "number", | |
"title": "custom_amount", | |
"description": "Set a custom price for the shipping method." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The order edit's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostOrderEditsShippingReqSchema": { | |
"type": "object", | |
"description": "The shipping method's details.", | |
"x-schemaName": "AdminPostOrderEditsShippingReqSchema", | |
"required": [ | |
"shipping_option_id" | |
], | |
"properties": { | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the associated shipping option." | |
}, | |
"custom_amount": { | |
"type": "number", | |
"title": "custom_amount", | |
"description": "Set a custom price for the shipping method." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The shipping method's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The shipping method's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostOrderEditsUpdateItemQuantityReqSchema": { | |
"type": "object", | |
"description": "The order item's details to update.", | |
"x-schemaName": "AdminPostOrderEditsUpdateItemQuantityReqSchema", | |
"required": [ | |
"quantity" | |
], | |
"properties": { | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"compare_at_unit_price": { | |
"type": "number", | |
"title": "compare_at_unit_price", | |
"description": "The original price of the item before a promotion or sale." | |
} | |
} | |
}, | |
"AdminPostOrderExchangesReqSchema": { | |
"type": "object", | |
"description": "The exchange's details.", | |
"x-schemaName": "AdminPostOrderExchangesReqSchema", | |
"required": [ | |
"order_id" | |
], | |
"properties": { | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this exchange is created for." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The exchange's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The exchange's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostReceiveReturnsReqSchema": { | |
"type": "object", | |
"description": "The return receival details.", | |
"x-schemaName": "AdminPostReceiveReturnsReqSchema", | |
"properties": { | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The return's description." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The return's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostReturnsConfirmRequestReqSchema": { | |
"type": "object", | |
"description": "The confirmation's details.", | |
"x-schemaName": "AdminPostReturnsConfirmRequestReqSchema", | |
"properties": { | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether to send the customer a notification about the confirmation." | |
} | |
} | |
}, | |
"AdminPostReturnsDismissItemsActionReqSchema": { | |
"type": "object", | |
"description": "The details to update of the damaged item.", | |
"x-schemaName": "AdminPostReturnsDismissItemsActionReqSchema", | |
"properties": { | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
} | |
} | |
}, | |
"AdminPostReturnsReceiveItemsActionReqSchema": { | |
"type": "object", | |
"description": "The details of the received item.", | |
"x-schemaName": "AdminPostReturnsReceiveItemsActionReqSchema", | |
"properties": { | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
} | |
} | |
}, | |
"AdminPostReturnsReceiveItemsReqSchema": { | |
"type": "object", | |
"description": "The items details.", | |
"x-schemaName": "AdminPostReturnsReceiveItemsReqSchema", | |
"properties": { | |
"items": { | |
"type": "array", | |
"description": "The items details.", | |
"items": { | |
"type": "object", | |
"description": "An item's details.", | |
"required": [ | |
"id", | |
"quantity" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The ID of the item in the order." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The item's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminPostReturnsReqSchema": { | |
"type": "object", | |
"description": "The return's details.", | |
"x-schemaName": "AdminPostReturnsReqSchema", | |
"required": [ | |
"order_id" | |
], | |
"properties": { | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order the return belongs to." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the location the items are returned to." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The return's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether to send the customer a notification about the created return." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The return's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostReturnsRequestItemsActionReqSchema": { | |
"type": "object", | |
"description": "The details to update in the item.", | |
"x-schemaName": "AdminPostReturnsRequestItemsActionReqSchema", | |
"properties": { | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"reason_id": { | |
"type": "string", | |
"title": "reason_id", | |
"description": "The ID of the associated return reason." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The claim's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostReturnsRequestItemsReqSchema": { | |
"type": "object", | |
"description": "The items' details.", | |
"x-schemaName": "AdminPostReturnsRequestItemsReqSchema", | |
"properties": { | |
"items": { | |
"type": "array", | |
"description": "The items' details.", | |
"items": { | |
"type": "object", | |
"description": "An item's details.", | |
"required": [ | |
"id", | |
"quantity" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The item's ID." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The item's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"reason_id": { | |
"type": "string", | |
"title": "reason_id", | |
"description": "The ID of the associated return reason." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminPostReturnsReturnReqSchema": { | |
"type": "object", | |
"description": "The return's details.", | |
"x-schemaName": "AdminPostReturnsReturnReqSchema", | |
"properties": { | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the location to return items to." | |
}, | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether the customer should receive notifications about updates to the return." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The return's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostReturnsShippingActionReqSchema": { | |
"type": "object", | |
"description": "The shipping method's details.", | |
"x-schemaName": "AdminPostReturnsShippingActionReqSchema", | |
"properties": { | |
"custom_amount": { | |
"type": "number", | |
"title": "custom_amount", | |
"description": "Set a custom price for the shipping method." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The return's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPostReturnsShippingReqSchema": { | |
"type": "object", | |
"description": "The shipping method's details.", | |
"x-schemaName": "AdminPostReturnsShippingReqSchema", | |
"required": [ | |
"shipping_option_id" | |
], | |
"properties": { | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the associated shipping option." | |
}, | |
"custom_amount": { | |
"type": "number", | |
"title": "custom_amount", | |
"description": "Set the price of the shipping method." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The shipping method's description." | |
}, | |
"internal_note": { | |
"type": "string", | |
"title": "internal_note", | |
"description": "A note viewed only by admin users." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The exchange's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminPrice": { | |
"type": "object", | |
"description": "The price's details.", | |
"x-schemaName": "AdminPrice", | |
"required": [ | |
"id", | |
"title", | |
"currency_code", | |
"amount", | |
"raw_amount", | |
"min_quantity", | |
"max_quantity", | |
"price_set_id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The price's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The price's title." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The price's currency code.", | |
"example": "usd" | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The price's amount." | |
}, | |
"raw_amount": { | |
"type": "object", | |
"description": "The price's raw amount." | |
}, | |
"min_quantity": { | |
"type": "number", | |
"title": "min_quantity", | |
"description": "The minimum quantity that must be available in the cart for the price to be applied." | |
}, | |
"max_quantity": { | |
"type": "number", | |
"title": "max_quantity", | |
"description": "The maximum quantity allowed to be available in the cart for the price to be applied." | |
}, | |
"price_set_id": { | |
"type": "string", | |
"title": "price_set_id", | |
"description": "The ID of the associated price set." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the price was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the price was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the price was deleted." | |
} | |
} | |
}, | |
"AdminPriceList": { | |
"type": "object", | |
"description": "The price list's details.", | |
"x-schemaName": "AdminPriceList", | |
"required": [ | |
"id", | |
"title", | |
"description", | |
"rules", | |
"starts_at", | |
"ends_at", | |
"status", | |
"type", | |
"prices", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The price list's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The price list's title." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The price list's description." | |
}, | |
"rules": { | |
"type": "object", | |
"description": "The price list's rules." | |
}, | |
"starts_at": { | |
"type": "string", | |
"title": "starts_at", | |
"description": "The date the price list starts." | |
}, | |
"ends_at": { | |
"type": "string", | |
"title": "ends_at", | |
"description": "The date the price list ends." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The price list's status.", | |
"enum": [ | |
"draft", | |
"active" | |
] | |
}, | |
"type": { | |
"type": "string", | |
"description": "The price list's type.", | |
"enum": [ | |
"sale", | |
"override" | |
] | |
}, | |
"prices": { | |
"type": "array", | |
"description": "The price list's prices.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPriceListPrice" | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the price list was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the price list was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the price list was deleted." | |
} | |
} | |
}, | |
"AdminPriceListBatchResponse": { | |
"type": "object", | |
"description": "The details of the created, updated, and deleted prices in a price list.", | |
"x-schemaName": "AdminPriceListBatchResponse", | |
"required": [ | |
"created", | |
"updated", | |
"deleted" | |
], | |
"properties": { | |
"created": { | |
"type": "array", | |
"description": "The created prices.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPrice" | |
} | |
}, | |
"updated": { | |
"type": "array", | |
"description": "The updated prices.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPrice" | |
} | |
}, | |
"deleted": { | |
"type": "object", | |
"description": "The details of the deleted prices.", | |
"required": [ | |
"ids", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"ids": { | |
"type": "array", | |
"description": "The IDs of the deleted prices.", | |
"items": { | |
"type": "string", | |
"title": "ids", | |
"description": "A price's ID." | |
} | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "price" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the prices were deleted." | |
} | |
} | |
} | |
} | |
}, | |
"AdminPriceListDeleteResponse": { | |
"type": "object", | |
"description": "The details of the deleted price list.", | |
"x-schemaName": "AdminPriceListDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The price list's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "price_list" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the price list was deleted." | |
} | |
} | |
}, | |
"AdminPriceListListResponse": { | |
"type": "object", | |
"description": "The paginated list of price lists.", | |
"x-schemaName": "AdminPriceListListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"price_lists" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"price_lists": { | |
"type": "array", | |
"description": "The list of price lists.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPriceList" | |
} | |
} | |
} | |
}, | |
"AdminPriceListPrice": { | |
"type": "object", | |
"description": "The details of a price list's price.", | |
"x-schemaName": "AdminPriceListPrice", | |
"required": [ | |
"variant_id", | |
"rules", | |
"id", | |
"title", | |
"currency_code", | |
"amount", | |
"raw_amount", | |
"min_quantity", | |
"max_quantity", | |
"price_set_id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the product variant this price list is for." | |
}, | |
"rules": { | |
"type": "object", | |
"description": "The price's rules." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The price's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The price's title." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The price's currency code.", | |
"example": "usd" | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The price's amount." | |
}, | |
"raw_amount": { | |
"type": "object", | |
"description": "The price's raw amount." | |
}, | |
"min_quantity": { | |
"type": "number", | |
"title": "min_quantity", | |
"description": "The minimum quantity that must be available in the cart for the price to be applied." | |
}, | |
"max_quantity": { | |
"type": "number", | |
"title": "max_quantity", | |
"description": "The maximum quantity allowed to be available in the cart for the price to be applied." | |
}, | |
"price_set_id": { | |
"type": "string", | |
"title": "price_set_id", | |
"description": "The ID of the price set this price belongs to." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the price was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the price was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the price was deleted." | |
} | |
} | |
}, | |
"AdminPriceListResponse": { | |
"type": "object", | |
"description": "The price list's details.", | |
"x-schemaName": "AdminPriceListResponse", | |
"required": [ | |
"price_list" | |
], | |
"properties": { | |
"price_list": { | |
"$ref": "#/components/schemas/AdminPriceList" | |
} | |
} | |
}, | |
"AdminPricePreference": { | |
"type": "object", | |
"description": "The price preference's details.", | |
"x-schemaName": "AdminPricePreference", | |
"required": [ | |
"id", | |
"attribute", | |
"value", | |
"is_tax_inclusive", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The price preference's ID." | |
}, | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The price preference's attribute.", | |
"example": "region_id" | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The price preference's value.", | |
"example": "reg_123" | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether prices matching this preference include taxes." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the price preference was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the price preference was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the price preference was deleted." | |
} | |
} | |
}, | |
"AdminPricePreferenceDeleteResponse": { | |
"type": "object", | |
"description": "The details of the deleted price preference.", | |
"x-schemaName": "AdminPricePreferenceDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The price preference's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "price_preference" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the price preference was deleted." | |
} | |
} | |
}, | |
"AdminPricePreferenceListResponse": { | |
"type": "object", | |
"description": "The paginated list of price preferences.", | |
"x-schemaName": "AdminPricePreferenceListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"price_preferences" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total count of items." | |
}, | |
"price_preferences": { | |
"type": "array", | |
"description": "The list of price preferences.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPricePreference" | |
} | |
} | |
} | |
}, | |
"AdminPricePreferenceResponse": { | |
"type": "object", | |
"description": "The price preference's details.", | |
"x-schemaName": "AdminPricePreferenceResponse", | |
"required": [ | |
"price_preference" | |
], | |
"properties": { | |
"price_preference": { | |
"$ref": "#/components/schemas/AdminPricePreference" | |
} | |
} | |
}, | |
"AdminProduct": { | |
"type": "object", | |
"description": "The product's details.", | |
"x-schemaName": "AdminProduct", | |
"required": [ | |
"variants", | |
"type", | |
"options", | |
"images", | |
"length", | |
"title", | |
"status", | |
"description", | |
"id", | |
"created_at", | |
"updated_at", | |
"subtitle", | |
"thumbnail", | |
"handle", | |
"is_giftcard", | |
"width", | |
"weight", | |
"height", | |
"origin_country", | |
"hs_code", | |
"mid_code", | |
"material", | |
"collection_id", | |
"type_id", | |
"discountable", | |
"external_id", | |
"deleted_at" | |
], | |
"properties": { | |
"collection": { | |
"$ref": "#/components/schemas/AdminCollection" | |
}, | |
"categories": { | |
"type": "array", | |
"description": "The product's categories.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductCategory" | |
} | |
}, | |
"sales_channels": { | |
"type": "array", | |
"description": "The sales channels that the product is available in.", | |
"items": { | |
"$ref": "#/components/schemas/AdminSalesChannel" | |
} | |
}, | |
"variants": { | |
"type": "array", | |
"description": "The product's variants.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductVariant" | |
} | |
}, | |
"type": { | |
"$ref": "#/components/schemas/AdminProductType" | |
}, | |
"tags": { | |
"type": "array", | |
"description": "The product's tags.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductTag" | |
} | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The product's length." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product's title." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The product's status.", | |
"enum": [ | |
"draft", | |
"proposed", | |
"published", | |
"rejected" | |
] | |
}, | |
"options": { | |
"type": "array", | |
"description": "The product's options.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductOption" | |
} | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The product's description." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product's ID." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the product was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the product was updated." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The product's unique handle." | |
}, | |
"subtitle": { | |
"type": "string", | |
"title": "subtitle", | |
"description": "The product's subtitle." | |
}, | |
"is_giftcard": { | |
"type": "boolean", | |
"title": "is_giftcard", | |
"description": "Whether the product is a gift card." | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The product's thumbnail." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The product's width." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The product's weight." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The product's height." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The product's origin country." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The product's HS code." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The product's MID code." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The product's material." | |
}, | |
"collection_id": { | |
"type": "string", | |
"title": "collection_id", | |
"description": "The ID of the collection that the product belongs to." | |
}, | |
"type_id": { | |
"type": "string", | |
"title": "type_id", | |
"description": "The ID of the product's type." | |
}, | |
"images": { | |
"type": "array", | |
"description": "The product's images.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductImage" | |
} | |
}, | |
"discountable": { | |
"type": "boolean", | |
"title": "discountable", | |
"description": "Whether discounts can be applied on the product." | |
}, | |
"external_id": { | |
"type": "string", | |
"title": "external_id", | |
"description": "The ID of a product in an external system, such as an ERP or CMS." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the product was deleted." | |
} | |
} | |
}, | |
"AdminProductCategory": { | |
"type": "object", | |
"description": "The product category's details.", | |
"x-schemaName": "AdminProductCategory", | |
"required": [ | |
"category_children", | |
"parent_category", | |
"name", | |
"description", | |
"id", | |
"created_at", | |
"updated_at", | |
"handle", | |
"deleted_at", | |
"is_active", | |
"is_internal", | |
"rank", | |
"parent_category_id" | |
], | |
"properties": { | |
"category_children": { | |
"type": "array", | |
"description": "The category's children.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"parent_category": { | |
"type": "object" | |
}, | |
"products": { | |
"type": "array", | |
"description": "The category's products.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The category's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The category's description." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The category's ID." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The category's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the category was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the category was updated." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The category's unique handle." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the category was deleted." | |
}, | |
"is_active": { | |
"type": "boolean", | |
"title": "is_active", | |
"description": "Whether the category is active. If disabled, the category isn't shown in the storefront." | |
}, | |
"is_internal": { | |
"type": "boolean", | |
"title": "is_internal", | |
"description": "Whether the category is internal. If enabled, the category is only seen by admin users." | |
}, | |
"rank": { | |
"type": "number", | |
"title": "rank", | |
"description": "The category's rank among sibling categories." | |
}, | |
"parent_category_id": { | |
"type": "string", | |
"title": "parent_category_id", | |
"description": "The ID of the category's parent." | |
} | |
} | |
}, | |
"AdminProductCategoryDeleteResponse": { | |
"type": "object", | |
"description": "The details of deleting the category.", | |
"x-schemaName": "AdminProductCategoryDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product category's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "product_category" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the product category was deleted." | |
} | |
} | |
}, | |
"AdminProductCategoryListResponse": { | |
"type": "object", | |
"description": "The paginated list of product categories.", | |
"x-schemaName": "AdminProductCategoryListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"product_categories" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"product_categories": { | |
"type": "array", | |
"description": "The list of product categories.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductCategory" | |
} | |
} | |
} | |
}, | |
"AdminProductCategoryResponse": { | |
"type": "object", | |
"description": "The product category's details.", | |
"x-schemaName": "AdminProductCategoryResponse", | |
"required": [ | |
"product_category" | |
], | |
"properties": { | |
"product_category": { | |
"$ref": "#/components/schemas/AdminProductCategory" | |
} | |
} | |
}, | |
"AdminProductDeleteResponse": { | |
"type": "object", | |
"description": "The details of the product deletion.", | |
"x-schemaName": "AdminProductDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "product" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the product was deleted." | |
} | |
} | |
}, | |
"AdminProductImage": { | |
"type": "object", | |
"description": "The image's details.", | |
"x-schemaName": "AdminProductImage", | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The image's ID." | |
}, | |
"url": { | |
"type": "string", | |
"title": "url", | |
"description": "The image's URL." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the image was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the image was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the image was deleted." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The image's metadata, can hold custom key-value pairs." | |
} | |
}, | |
"required": [ | |
"id", | |
"url" | |
] | |
}, | |
"AdminProductOption": { | |
"type": "object", | |
"description": "The product option's details.", | |
"x-schemaName": "AdminProductOption", | |
"required": [ | |
"id", | |
"title" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product option's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product option's title." | |
}, | |
"product": { | |
"type": "object" | |
}, | |
"product_id": { | |
"type": "string", | |
"title": "product_id", | |
"description": "The ID of the product this option belongs to." | |
}, | |
"values": { | |
"type": "array", | |
"description": "The product option's values.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product option's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the product option was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the product option was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the product option was deleted." | |
} | |
} | |
}, | |
"AdminProductOptionDeleteResponse": { | |
"type": "object", | |
"description": "The details of the product option deletion.", | |
"x-schemaName": "AdminProductOptionDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product option's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "product_option" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the product option was deleted." | |
}, | |
"parent": { | |
"$ref": "#/components/schemas/AdminProduct" | |
} | |
} | |
}, | |
"AdminProductOptionResponse": { | |
"type": "object", | |
"description": "The product option's details.", | |
"x-schemaName": "AdminProductOptionResponse", | |
"required": [ | |
"product_option" | |
], | |
"properties": { | |
"product_option": { | |
"$ref": "#/components/schemas/AdminProductOption" | |
} | |
} | |
}, | |
"AdminProductOptionValue": { | |
"type": "object", | |
"description": "The product option value's details.", | |
"x-schemaName": "AdminProductOptionValue", | |
"required": [ | |
"id", | |
"value" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The value's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The value." | |
}, | |
"option": { | |
"$ref": "#/components/schemas/AdminProductOption" | |
}, | |
"option_id": { | |
"type": "string", | |
"title": "option_id", | |
"description": "The ID of the option this value belongs to." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The value's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the value was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the value was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the value was deleted." | |
} | |
} | |
}, | |
"AdminProductResponse": { | |
"type": "object", | |
"description": "The product's details.", | |
"x-schemaName": "AdminProductResponse", | |
"required": [ | |
"product" | |
], | |
"properties": { | |
"product": { | |
"$ref": "#/components/schemas/AdminProduct" | |
} | |
} | |
}, | |
"AdminProductTag": { | |
"type": "object", | |
"description": "The product tag's details.", | |
"x-schemaName": "AdminProductTag", | |
"required": [ | |
"id", | |
"value", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tag's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The tag's value." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the tag was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the tag was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the tag was deleted." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The tag's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminProductTagDeleteResponse": { | |
"type": "object", | |
"description": "The details of the product tag deletion.", | |
"x-schemaName": "AdminProductTagDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product tag's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "product_tag" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the product tag was deleted." | |
} | |
} | |
}, | |
"AdminProductTagListResponse": { | |
"type": "object", | |
"description": "The paginated list of product tags.", | |
"x-schemaName": "AdminProductTagListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"product_tags" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"product_tags": { | |
"type": "array", | |
"description": "The list of product tags.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductTag" | |
} | |
} | |
} | |
}, | |
"AdminProductTagResponse": { | |
"type": "object", | |
"description": "The product tag's details.", | |
"x-schemaName": "AdminProductTagResponse", | |
"required": [ | |
"product_tag" | |
], | |
"properties": { | |
"product_tag": { | |
"$ref": "#/components/schemas/AdminProductTag" | |
} | |
} | |
}, | |
"AdminProductType": { | |
"type": "object", | |
"description": "The product type's details.", | |
"x-schemaName": "AdminProductType", | |
"required": [ | |
"id", | |
"value", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The type's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The type's value." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the type was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the type was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the type was deleted." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The type's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminProductTypeDeleteResponse": { | |
"type": "object", | |
"description": "The details of the product type deletion.", | |
"x-schemaName": "AdminProductTypeDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product type's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "product_type" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the product type was deleted." | |
} | |
} | |
}, | |
"AdminProductTypeListResponse": { | |
"type": "object", | |
"description": "The paginated list of product types.", | |
"x-schemaName": "AdminProductTypeListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"product_types" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"product_types": { | |
"type": "array", | |
"description": "The list of product types.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductType" | |
} | |
} | |
} | |
}, | |
"AdminProductTypeResponse": { | |
"type": "object", | |
"description": "The product type's details.", | |
"x-schemaName": "AdminProductTypeResponse", | |
"required": [ | |
"product_type" | |
], | |
"properties": { | |
"product_type": { | |
"$ref": "#/components/schemas/AdminProductType" | |
} | |
} | |
}, | |
"AdminProductVariant": { | |
"type": "object", | |
"description": "The product variant's details.", | |
"x-schemaName": "AdminProductVariant", | |
"required": [ | |
"prices", | |
"options", | |
"id", | |
"title", | |
"sku", | |
"barcode", | |
"ean", | |
"upc", | |
"allow_backorder", | |
"manage_inventory", | |
"hs_code", | |
"origin_country", | |
"mid_code", | |
"material", | |
"weight", | |
"length", | |
"height", | |
"width", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"prices": { | |
"type": "array", | |
"description": "The variant's prices.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPrice" | |
} | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The variant's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The variant's title." | |
}, | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The variant's SKU." | |
}, | |
"barcode": { | |
"type": "string", | |
"title": "barcode", | |
"description": "The variant's barcode." | |
}, | |
"ean": { | |
"type": "string", | |
"title": "ean", | |
"description": "The variant's EAN code." | |
}, | |
"upc": { | |
"type": "string", | |
"title": "upc", | |
"description": "The variant's UPC." | |
}, | |
"allow_backorder": { | |
"type": "boolean", | |
"title": "allow_backorder", | |
"description": "Whether the variant can be ordered even if it's out of stock." | |
}, | |
"manage_inventory": { | |
"type": "boolean", | |
"title": "manage_inventory", | |
"description": "Whether the Medusa application manages the variant's inventory quantity and availablility. If disabled, the variant is always considered in stock." | |
}, | |
"inventory_quantity": { | |
"type": "number", | |
"title": "inventory_quantity", | |
"description": "The variant's inventory quantity. This is only included if you pass in the `fields` query parameter a `+variants.inventory_quantity` parameter." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The variant's HS code." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The variant's origin country." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The variant's MID code." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The variant's material." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The variant's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The variant's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The variant's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The variant's width." | |
}, | |
"variant_rank": { | |
"type": "number", | |
"title": "variant_rank", | |
"description": "The variant's rank among its sibling variants." | |
}, | |
"options": { | |
"type": "array", | |
"description": "The variant's option values.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductOptionValue" | |
} | |
}, | |
"product": { | |
"type": "object" | |
}, | |
"product_id": { | |
"type": "string", | |
"title": "product_id", | |
"description": "The ID of the product that the variant belongs to." | |
}, | |
"calculated_price": { | |
"$ref": "#/components/schemas/BaseCalculatedPriceSet" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the variant was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the variant was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the variant was deleted." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The variant's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminProductVariantDeleteResponse": { | |
"type": "object", | |
"description": "The details of the product variant's deletion.", | |
"x-schemaName": "AdminProductVariantDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product variant's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object." | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the product variant was deleted.", | |
"default": "variant" | |
}, | |
"parent": { | |
"$ref": "#/components/schemas/AdminProduct" | |
} | |
} | |
}, | |
"AdminProductVariantInventoryBatchResponse": { | |
"type": "object", | |
"description": "The created, updated, and deleted associations between variants and inventory items.", | |
"x-schemaName": "AdminProductVariantInventoryBatchResponse", | |
"required": [ | |
"created", | |
"updated", | |
"deleted" | |
], | |
"properties": { | |
"created": { | |
"oneOf": [ | |
{ | |
"$ref": "#/components/schemas/AdminProductVariantInventoryLink" | |
}, | |
{ | |
"type": "array", | |
"description": "The created associations between product variants and inventory items.", | |
"items": { | |
"type": "object", | |
"description": "A created association between a product variant and an inventory item.", | |
"x-schemaName": "AdminProductVariantInventoryLink", | |
"required": [ | |
"productService", | |
"inventoryService" | |
], | |
"properties": { | |
"productService": { | |
"type": "object", | |
"description": "The product variant's details.", | |
"required": [ | |
"variant_id" | |
], | |
"properties": { | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the product variant." | |
} | |
} | |
}, | |
"inventoryService": { | |
"type": "object", | |
"description": "The inventory item's details.", | |
"required": [ | |
"inventory_item_id" | |
], | |
"properties": { | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the inventory item." | |
} | |
} | |
} | |
} | |
} | |
} | |
] | |
}, | |
"updated": { | |
"oneOf": [ | |
{ | |
"$ref": "#/components/schemas/AdminProductVariantInventoryLink" | |
}, | |
{ | |
"type": "array", | |
"description": "The updated associations between product variants and inventory items.", | |
"items": { | |
"type": "object", | |
"description": "An updated association between a product variant and an inventory item.", | |
"x-schemaName": "AdminProductVariantInventoryLink", | |
"required": [ | |
"productService", | |
"inventoryService" | |
], | |
"properties": { | |
"productService": { | |
"type": "object", | |
"description": "The product variant's details.", | |
"required": [ | |
"variant_id" | |
], | |
"properties": { | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the product variant." | |
} | |
} | |
}, | |
"inventoryService": { | |
"type": "object", | |
"description": "The inventory item's details.", | |
"required": [ | |
"inventory_item_id" | |
], | |
"properties": { | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the inventory item." | |
} | |
} | |
} | |
} | |
} | |
} | |
] | |
}, | |
"deleted": { | |
"oneOf": [ | |
{ | |
"$ref": "#/components/schemas/AdminProductVariantInventoryLink" | |
}, | |
{ | |
"type": "array", | |
"description": "The deleted associations between product variants and inventory items.", | |
"items": { | |
"type": "object", | |
"description": "An deleted association between a product variant and an inventory item.", | |
"x-schemaName": "AdminProductVariantInventoryLink", | |
"required": [ | |
"productService", | |
"inventoryService" | |
], | |
"properties": { | |
"productService": { | |
"type": "object", | |
"description": "The product variant's details.", | |
"required": [ | |
"variant_id" | |
], | |
"properties": { | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the product variant." | |
} | |
} | |
}, | |
"inventoryService": { | |
"type": "object", | |
"description": "The inventory item's details.", | |
"required": [ | |
"inventory_item_id" | |
], | |
"properties": { | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the inventory item." | |
} | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
}, | |
"AdminProductVariantInventoryLink": { | |
"type": "object", | |
"description": "The details of an association between a product variant and an inventory item.", | |
"x-schemaName": "AdminProductVariantInventoryLink", | |
"required": [ | |
"Product", | |
"Inventory" | |
], | |
"properties": { | |
"Product": { | |
"type": "object", | |
"description": "The product variant's details.", | |
"required": [ | |
"variant_id" | |
], | |
"properties": { | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the product variant." | |
} | |
} | |
}, | |
"Inventory": { | |
"type": "object", | |
"description": "The inventory item's details.", | |
"required": [ | |
"inventory_item_id" | |
], | |
"properties": { | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the inventory item." | |
} | |
} | |
} | |
} | |
}, | |
"AdminProductVariantInventoryLinkDeleteResponse": { | |
"type": "object", | |
"description": "The details of the deleted associated between a product variant and an inventory item.", | |
"x-schemaName": "AdminProductVariantInventoryLinkDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted", | |
"parent" | |
], | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/AdminProductVariantInventoryLink" | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "variant-inventory-item-link" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the association was deleted." | |
}, | |
"parent": { | |
"$ref": "#/components/schemas/AdminProductVariant" | |
} | |
} | |
}, | |
"AdminProductVariantResponse": { | |
"type": "object", | |
"description": "The product variant's details.", | |
"x-schemaName": "AdminProductVariantResponse", | |
"required": [ | |
"variant" | |
], | |
"properties": { | |
"variant": { | |
"$ref": "#/components/schemas/AdminProductVariant" | |
} | |
} | |
}, | |
"AdminPromotion": { | |
"type": "object", | |
"description": "The promotion's details.", | |
"x-schemaName": "AdminPromotion", | |
"required": [ | |
"id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"application_method": { | |
"type": "object" | |
}, | |
"rules": { | |
"type": "array", | |
"description": "The promotion's rules.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPromotionRule" | |
} | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The promotion's ID." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The promotion's code.", | |
"example": "OFF50" | |
}, | |
"type": { | |
"type": "string", | |
"description": "The promotion's type.", | |
"enum": [ | |
"standard", | |
"buyget" | |
] | |
}, | |
"is_automatic": { | |
"type": "boolean", | |
"title": "is_automatic", | |
"description": "Whether the promotion is applied on a cart automatically if it matches the promotion's rules." | |
}, | |
"campaign_id": { | |
"type": "string", | |
"title": "campaign_id", | |
"description": "The ID of the campaign this promotion belongs to." | |
}, | |
"campaign": { | |
"$ref": "#/components/schemas/AdminCampaign" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the promotion was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the promotion was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the promotion was deleted." | |
} | |
} | |
}, | |
"AdminPromotionResponse": { | |
"type": "object", | |
"description": "The promotion's details.", | |
"x-schemaName": "AdminPromotionResponse", | |
"required": [ | |
"promotion" | |
], | |
"properties": { | |
"promotion": { | |
"$ref": "#/components/schemas/AdminPromotion" | |
} | |
} | |
}, | |
"AdminPromotionRule": { | |
"type": "object", | |
"description": "The promotion rule's details.", | |
"x-schemaName": "AdminPromotionRule", | |
"required": [ | |
"id", | |
"values" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The promotion rule's ID." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The promotion rule's description." | |
}, | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The promotion rule's attribute.", | |
"example": "customer_group_id" | |
}, | |
"operator": { | |
"type": "string", | |
"description": "The rule's operator.", | |
"enum": [ | |
"gt", | |
"lt", | |
"eq", | |
"ne", | |
"in", | |
"lte", | |
"gte" | |
] | |
}, | |
"values": { | |
"type": "array", | |
"description": "The rule's values.", | |
"example": [ | |
"cusgroup_123" | |
], | |
"items": { | |
"$ref": "#/components/schemas/BasePromotionRuleValue" | |
} | |
} | |
} | |
}, | |
"AdminRefund": { | |
"type": "object", | |
"description": "The refund's details.", | |
"x-schemaName": "AdminRefund", | |
"required": [ | |
"id", | |
"amount", | |
"created_at", | |
"payment" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The refund's ID." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The refund's amount." | |
}, | |
"refund_reason_id": { | |
"type": "string", | |
"title": "refund_reason_id", | |
"description": "The ID of the refund reason." | |
}, | |
"note": { | |
"type": "string", | |
"title": "note", | |
"description": "More details about the refund." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the refund was created." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created the refund." | |
}, | |
"payment": { | |
"$ref": "#/components/schemas/BasePayment" | |
}, | |
"refund_reason": { | |
"$ref": "#/components/schemas/RefundReason" | |
} | |
} | |
}, | |
"AdminRefundReason": { | |
"type": "object", | |
"description": "The refund reason's details.", | |
"x-schemaName": "AdminRefundReason", | |
"required": [ | |
"id", | |
"label", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The refund reason's ID." | |
}, | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The refund reason's label." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The refund reason's description." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The refund reason's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the refund reason was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the refund reason was updated." | |
} | |
} | |
}, | |
"AdminRegion": { | |
"type": "object", | |
"description": "The region's details.", | |
"x-schemaName": "AdminRegion", | |
"required": [ | |
"name", | |
"currency_code", | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The region's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The region's name." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The region's currency code.", | |
"example": "usd" | |
}, | |
"automatic_taxes": { | |
"type": "boolean", | |
"title": "automatic_taxes", | |
"description": "Whether taxes are applied automatically during checkout." | |
}, | |
"countries": { | |
"type": "array", | |
"description": "The region's countries.", | |
"items": { | |
"$ref": "#/components/schemas/AdminRegionCountry" | |
} | |
}, | |
"payment_providers": { | |
"type": "array", | |
"description": "The region's payment providers.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPaymentProvider" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The region's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the region was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the region was updated." | |
} | |
} | |
}, | |
"AdminRegionCountry": { | |
"type": "object", | |
"description": "The country's details.", | |
"x-schemaName": "AdminRegionCountry", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The country's ID." | |
}, | |
"iso_2": { | |
"type": "string", | |
"title": "iso_2", | |
"description": "The country's iso 2.", | |
"example": "us" | |
}, | |
"iso_3": { | |
"type": "string", | |
"title": "iso_3", | |
"description": "The country's iso 3.", | |
"example": "usa" | |
}, | |
"num_code": { | |
"type": "string", | |
"title": "num_code", | |
"description": "The country's num code.", | |
"example": 840 | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The country's name." | |
}, | |
"display_name": { | |
"type": "string", | |
"title": "display_name", | |
"description": "The country's display name." | |
} | |
} | |
}, | |
"AdminRegionResponse": { | |
"type": "object", | |
"description": "The region's details.", | |
"x-schemaName": "AdminRegionResponse", | |
"required": [ | |
"region" | |
], | |
"properties": { | |
"region": { | |
"$ref": "#/components/schemas/AdminRegion" | |
} | |
} | |
}, | |
"AdminReservation": { | |
"type": "object", | |
"description": "The reservation's details.", | |
"x-schemaName": "AdminReservation", | |
"required": [ | |
"id", | |
"line_item_id", | |
"location_id", | |
"quantity", | |
"external_id", | |
"description", | |
"inventory_item_id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The reservation's ID." | |
}, | |
"line_item_id": { | |
"type": "string", | |
"title": "line_item_id", | |
"description": "The ID of the line item this reservation is for." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the location the quantity is reserved from." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The reservation's quantity." | |
}, | |
"external_id": { | |
"type": "string", | |
"title": "external_id", | |
"description": "An ID in an external system" | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The reservation's description." | |
}, | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the inventory item this reservation is associated with." | |
}, | |
"inventory_item": { | |
"$ref": "#/components/schemas/AdminInventoryItem" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The reservation's metadata, can hold custom key-value pairs." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created this reservation." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date this reservation was deleted." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date this reservation was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date this reservation was updated." | |
} | |
} | |
}, | |
"AdminReservationResponse": { | |
"type": "object", | |
"description": "The reservation's details.", | |
"x-schemaName": "AdminReservationResponse", | |
"required": [ | |
"reservation" | |
], | |
"properties": { | |
"reservation": { | |
"$ref": "#/components/schemas/AdminReservation" | |
} | |
} | |
}, | |
"AdminReturn": { | |
"type": "object", | |
"description": "The return's details.", | |
"x-schemaName": "AdminReturn", | |
"required": [ | |
"items", | |
"id", | |
"order_id", | |
"order_version", | |
"display_id", | |
"received_at", | |
"created_at", | |
"canceled_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The return's ID." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The return's status.", | |
"enum": [ | |
"canceled", | |
"requested", | |
"received", | |
"partially_received" | |
] | |
}, | |
"refund_amount": { | |
"type": "number", | |
"title": "refund_amount", | |
"description": "The amount refunded by this return." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the associated order." | |
}, | |
"items": { | |
"type": "array", | |
"description": "The return's items.", | |
"items": { | |
"$ref": "#/components/schemas/AdminReturnItem" | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the return was created." | |
}, | |
"canceled_at": { | |
"type": "string", | |
"title": "canceled_at", | |
"description": "The date the return was canceled.", | |
"format": "date-time" | |
}, | |
"exchange_id": { | |
"type": "string", | |
"title": "exchange_id", | |
"description": "The return's exchange id." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The return's location id." | |
}, | |
"claim_id": { | |
"type": "string", | |
"title": "claim_id", | |
"description": "The return's claim id." | |
}, | |
"order_version": { | |
"type": "number", | |
"title": "order_version", | |
"description": "The return's order version." | |
}, | |
"display_id": { | |
"type": "number", | |
"title": "display_id", | |
"description": "The return's display id." | |
}, | |
"no_notification": { | |
"type": "boolean", | |
"title": "no_notification", | |
"description": "Whether the customer should receive notifications about the return's updates." | |
}, | |
"received_at": { | |
"type": "string", | |
"title": "received_at", | |
"description": "The date the return was received." | |
} | |
} | |
}, | |
"AdminReturnItem": { | |
"type": "object", | |
"description": "The return item's details.", | |
"x-schemaName": "AdminReturnItem", | |
"required": [ | |
"id", | |
"quantity", | |
"received_quantity", | |
"damaged_quantity", | |
"item_id", | |
"return_id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The return item's ID." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The return item's quantity." | |
}, | |
"received_quantity": { | |
"type": "number", | |
"title": "received_quantity", | |
"description": "The received quantity of the item. This quantity is added to the stocked inventory quantity of the item." | |
}, | |
"damaged_quantity": { | |
"type": "number", | |
"title": "damaged_quantity", | |
"description": "The received damaged quantity of the item, which isn't added to the stocked inventory quantity of the item." | |
}, | |
"reason_id": { | |
"type": "string", | |
"title": "reason_id", | |
"description": "The ID of the return reason associated with the item." | |
}, | |
"note": { | |
"type": "string", | |
"title": "note", | |
"description": "A note about why the item was returned." | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "item_id", | |
"description": "The ID of the associated order item." | |
}, | |
"return_id": { | |
"type": "string", | |
"title": "return_id", | |
"description": "The ID of the return this return item belongs to." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The return item's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminReturnPreviewResponse": { | |
"type": "object", | |
"description": "The details of a return and a preview of the order once the return is applied.", | |
"x-schemaName": "AdminReturnPreviewResponse", | |
"required": [ | |
"order_preview", | |
"return" | |
], | |
"properties": { | |
"order_preview": { | |
"$ref": "#/components/schemas/AdminOrderPreview" | |
}, | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
} | |
} | |
}, | |
"AdminReturnReason": { | |
"type": "object", | |
"description": "The return reason's details.", | |
"x-schemaName": "AdminReturnReason", | |
"required": [ | |
"id", | |
"value", | |
"label", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The return reason's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The return reason's value." | |
}, | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The return reason's label." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The return reason's description." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The return reason's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the return reason was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the return reason was updated." | |
} | |
} | |
}, | |
"AdminReturnReasonDeleteResponse": { | |
"type": "object", | |
"description": "The details of the return reason deletion.", | |
"x-schemaName": "AdminReturnReasonDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The return reason's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "return_reason" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the return reason was deleted." | |
} | |
} | |
}, | |
"AdminReturnReasonListResponse": { | |
"type": "object", | |
"description": "The paginated list of return reasons.", | |
"x-schemaName": "AdminReturnReasonListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"return_reasons" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"return_reasons": { | |
"type": "array", | |
"description": "The list of return reasons.", | |
"items": { | |
"$ref": "#/components/schemas/AdminReturnReason" | |
} | |
} | |
} | |
}, | |
"AdminReturnReasonResponse": { | |
"type": "object", | |
"description": "The return reason's details.", | |
"x-schemaName": "AdminReturnReasonResponse", | |
"required": [ | |
"return_reason" | |
], | |
"properties": { | |
"return_reason": { | |
"$ref": "#/components/schemas/AdminReturnReason" | |
} | |
} | |
}, | |
"AdminReturnResponse": { | |
"type": "object", | |
"description": "The return's details.", | |
"x-schemaName": "AdminReturnResponse", | |
"required": [ | |
"return" | |
], | |
"properties": { | |
"return": { | |
"$ref": "#/components/schemas/AdminReturn" | |
} | |
} | |
}, | |
"AdminRevokeApiKey": { | |
"type": "object", | |
"description": "The details of revoking the API key.", | |
"x-schemaName": "AdminRevokeApiKey", | |
"properties": { | |
"revoke_in": { | |
"type": "number", | |
"title": "revoke_in", | |
"description": "The time in seconds to revoke the API key after. If not set, the API key is revoked immediately." | |
} | |
} | |
}, | |
"AdminRuleAttributeOption": { | |
"type": "object", | |
"description": "The details of a potential rule attribute.", | |
"x-schemaName": "AdminRuleAttributeOption", | |
"required": [ | |
"id", | |
"value", | |
"label", | |
"operators" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The rule attribute's ID, which is a rule's `attribute` it refers to.", | |
"example": "customer_group" | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The rule attribute's value.", | |
"example": "customer.groups.id" | |
}, | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The rule attribute option's label.", | |
"example": "Customer Group" | |
}, | |
"operators": { | |
"type": "array", | |
"description": "The attribute's operators.", | |
"items": { | |
"$ref": "#/components/schemas/BaseRuleOperatorOptions" | |
} | |
} | |
} | |
}, | |
"AdminRuleValueOption": { | |
"type": "object", | |
"description": "The details of a potential rule value.", | |
"x-schemaName": "AdminRuleValueOption", | |
"required": [ | |
"value", | |
"label" | |
], | |
"properties": { | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The rule value's value.", | |
"example": "reg_123" | |
}, | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The rule value's label.", | |
"example": "Europe Region" | |
} | |
} | |
}, | |
"AdminSalesChannel": { | |
"type": "object", | |
"description": "The sales channel's details.", | |
"x-schemaName": "AdminSalesChannel", | |
"required": [ | |
"id", | |
"name", | |
"description", | |
"is_disabled", | |
"metadata", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The sales channel's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The sales channel's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The sales channel's description." | |
}, | |
"is_disabled": { | |
"type": "boolean", | |
"title": "is_disabled", | |
"description": "Whether the sales channel is disabled." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The sales channel's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the sales channel was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the sales channel was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the sales channel was deleted." | |
} | |
} | |
}, | |
"AdminSalesChannelDeleteResponse": { | |
"type": "object", | |
"description": "The details of deleting a sales channel.", | |
"x-schemaName": "AdminSalesChannelDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The sales channel's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "sales-channel" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the sales channel was deleted." | |
} | |
} | |
}, | |
"AdminSalesChannelResponse": { | |
"type": "object", | |
"description": "The sales channel's details.", | |
"x-schemaName": "AdminSalesChannelResponse", | |
"required": [ | |
"sales_channel" | |
], | |
"properties": { | |
"sales_channel": { | |
"$ref": "#/components/schemas/AdminSalesChannel" | |
} | |
} | |
}, | |
"AdminServiceZone": { | |
"type": "object", | |
"description": "The shipping option's service zone.", | |
"x-schemaName": "AdminServiceZone", | |
"required": [ | |
"id", | |
"name", | |
"fulfillment_set_id", | |
"fulfillment_set", | |
"geo_zones", | |
"shipping_options", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The service zone's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The service zone's name." | |
}, | |
"fulfillment_set_id": { | |
"type": "string", | |
"title": "fulfillment_set_id", | |
"description": "The service zone's fulfillment set id." | |
}, | |
"fulfillment_set": { | |
"type": "object" | |
}, | |
"geo_zones": { | |
"type": "array", | |
"description": "The service zone's geo zones.", | |
"items": { | |
"$ref": "#/components/schemas/AdminGeoZone" | |
} | |
}, | |
"shipping_options": { | |
"type": "array", | |
"description": "The service zone's shipping options.", | |
"items": { | |
"$ref": "#/components/schemas/AdminShippingOption" | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The service zone's created at." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The service zone's updated at." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The service zone's deleted at." | |
} | |
} | |
}, | |
"AdminServiceZoneDeleteResponse": { | |
"type": "object", | |
"description": "The details of the service zone deletion.", | |
"x-schemaName": "AdminServiceZoneDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The service zone's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "service_zone" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the service zone was deleted." | |
}, | |
"parent": { | |
"$ref": "#/components/schemas/AdminFulfillmentSet" | |
} | |
} | |
}, | |
"AdminServiceZoneResponse": { | |
"type": "object", | |
"description": "The service zone's details.", | |
"x-schemaName": "AdminServiceZoneResponse", | |
"required": [ | |
"service_zone" | |
], | |
"properties": { | |
"service_zone": { | |
"$ref": "#/components/schemas/AdminServiceZone" | |
} | |
} | |
}, | |
"AdminShippingOption": { | |
"type": "object", | |
"description": "The shipping option's details.", | |
"x-schemaName": "AdminShippingOption", | |
"required": [ | |
"id", | |
"name", | |
"price_type", | |
"service_zone_id", | |
"service_zone", | |
"provider_id", | |
"provider", | |
"shipping_option_type_id", | |
"type", | |
"shipping_profile_id", | |
"shipping_profile", | |
"rules", | |
"prices", | |
"data", | |
"metadata", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping option's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The shipping option's name." | |
}, | |
"price_type": { | |
"type": "string", | |
"description": "The shipping option's price type. If it's `flat`, the price is fixed and is set in the `prices` property. If it's `calculated`, the price is calculated on checkout by the associated fulfillment provider.", | |
"enum": [ | |
"calculated", | |
"flat" | |
] | |
}, | |
"service_zone_id": { | |
"type": "string", | |
"title": "service_zone_id", | |
"description": "The ID of the service zone this option belongs to." | |
}, | |
"service_zone": { | |
"type": "object" | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the provider handling fulfillments created from this shipping option." | |
}, | |
"provider": { | |
"$ref": "#/components/schemas/AdminFulfillmentProvider" | |
}, | |
"shipping_option_type_id": { | |
"type": "string", | |
"title": "shipping_option_type_id", | |
"description": "The ID of the associated shipping option type." | |
}, | |
"type": { | |
"$ref": "#/components/schemas/AdminShippingOptionType" | |
}, | |
"shipping_profile_id": { | |
"type": "string", | |
"title": "shipping_profile_id", | |
"description": "The ID of the associated shipping profile." | |
}, | |
"shipping_profile": { | |
"$ref": "#/components/schemas/AdminShippingProfile" | |
}, | |
"rules": { | |
"type": "array", | |
"description": "The shipping option's rules.", | |
"items": { | |
"$ref": "#/components/schemas/AdminShippingOptionRule" | |
} | |
}, | |
"prices": { | |
"type": "array", | |
"description": "The shipping option's prices. If the `price_type` is `calculated`, this array will be empty since the price is calculated by the fulfillment provider during checkout.", | |
"items": { | |
"$ref": "#/components/schemas/AdminShippingOptionPrice" | |
} | |
}, | |
"data": { | |
"type": "object", | |
"description": "The shipping option's data, useful for the fulfillment provider handling fulfillments created from this option.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The shipping option's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping option was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping option was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the shipping option was deleted." | |
} | |
} | |
}, | |
"AdminShippingOptionDeleteResponse": { | |
"type": "object", | |
"description": "The details of the shipping option's deletion.", | |
"x-schemaName": "AdminShippingOptionDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping option's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "shipping_option" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the shipping option was deleted." | |
} | |
} | |
}, | |
"AdminShippingOptionPrice": { | |
"type": "object", | |
"description": "The details of the shipping option's price.", | |
"x-schemaName": "AdminShippingOptionPrice", | |
"required": [ | |
"price_rules", | |
"rules_count", | |
"id", | |
"title", | |
"currency_code", | |
"amount", | |
"raw_amount", | |
"min_quantity", | |
"max_quantity", | |
"price_set_id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"price_rules": { | |
"type": "array", | |
"description": "The price's rules.", | |
"items": { | |
"$ref": "#/components/schemas/AdminShippingOptionPriceRule" | |
} | |
}, | |
"rules_count": { | |
"type": "number", | |
"title": "rules_count", | |
"description": "The number of rules the price has." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The price's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The price's title." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The price's currency code.", | |
"example": "usd" | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The price's amount." | |
}, | |
"raw_amount": { | |
"type": "object", | |
"description": "The price's raw amount." | |
}, | |
"min_quantity": { | |
"type": "number", | |
"title": "min_quantity", | |
"description": "The minimum quantity required in the cart for this price to apply." | |
}, | |
"max_quantity": { | |
"type": "number", | |
"title": "max_quantity", | |
"description": "The maximum quantity that the cart's items must not surpass for this price to apply." | |
}, | |
"price_set_id": { | |
"type": "string", | |
"title": "price_set_id", | |
"description": "The ID of the price set this price belongs to." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the price was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the price was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the price was deleted." | |
} | |
} | |
}, | |
"AdminShippingOptionPriceRule": { | |
"type": "object", | |
"description": "The details of a shipping option price's rule.", | |
"x-schemaName": "AdminShippingOptionPriceRule", | |
"required": [ | |
"id", | |
"value" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The price rule's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The price rule's value." | |
} | |
} | |
}, | |
"AdminShippingOptionResponse": { | |
"type": "object", | |
"description": "The shipping option's details.", | |
"x-schemaName": "AdminShippingOptionResponse", | |
"required": [ | |
"shipping_option" | |
], | |
"properties": { | |
"shipping_option": { | |
"$ref": "#/components/schemas/AdminShippingOption" | |
} | |
} | |
}, | |
"AdminShippingOptionRule": { | |
"type": "object", | |
"description": "The shipping option rule's details.", | |
"x-schemaName": "AdminShippingOptionRule", | |
"required": [ | |
"id", | |
"attribute", | |
"operator", | |
"value", | |
"shipping_option_id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping option rule's ID." | |
}, | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The shipping option rule's attribute.", | |
"example": "is_return" | |
}, | |
"operator": { | |
"type": "string", | |
"title": "operator", | |
"description": "The shipping option rule's operator.", | |
"example": "eq" | |
}, | |
"value": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "value", | |
"description": "The rule's value.", | |
"example": "\"true\"" | |
}, | |
{ | |
"type": "array", | |
"description": "The rule's values.", | |
"items": { | |
"type": "string", | |
"title": "value", | |
"description": "A rule's value", | |
"example": "\"true\"" | |
} | |
} | |
] | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the shipping option this rule is for." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping option rule was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping option rule was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the shipping option rule was deleted." | |
} | |
} | |
}, | |
"AdminShippingOptionType": { | |
"type": "object", | |
"description": "The shipping option's details.", | |
"x-schemaName": "AdminShippingOptionType", | |
"required": [ | |
"id", | |
"label", | |
"description", | |
"code", | |
"shipping_option_id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping option's ID." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping option was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping option was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the shipping option was deleted." | |
}, | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The type's label." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The type's description." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The type's code." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The type's shipping option id." | |
} | |
} | |
}, | |
"AdminShippingProfile": { | |
"type": "object", | |
"description": "The shipping profile's details..", | |
"x-schemaName": "AdminShippingProfile", | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping profile's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The shipping profile's name." | |
}, | |
"type": { | |
"type": "string", | |
"title": "type", | |
"description": "The shipping profile's type." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The shipping profile's metadata, holds custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping profile was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping profile was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the shipping profile was deleted." | |
} | |
}, | |
"required": [ | |
"id", | |
"name", | |
"type", | |
"metadata", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
] | |
}, | |
"AdminShippingProfileDeleteResponse": { | |
"type": "object", | |
"description": "The details of the shipping profile's deletion.", | |
"x-schemaName": "AdminShippingProfileDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping profile's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "shipping_profile" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the shipping profile was deleted." | |
} | |
} | |
}, | |
"AdminShippingProfileResponse": { | |
"type": "object", | |
"description": "The shipping profile's details.", | |
"x-schemaName": "AdminShippingProfileResponse", | |
"required": [ | |
"shipping_profile" | |
], | |
"properties": { | |
"shipping_profile": { | |
"$ref": "#/components/schemas/AdminShippingProfile" | |
} | |
} | |
}, | |
"AdminStockLocation": { | |
"type": "object", | |
"description": "The stock location's details.", | |
"x-schemaName": "AdminStockLocation", | |
"required": [ | |
"id", | |
"name", | |
"address_id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The location's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The location's name." | |
}, | |
"address_id": { | |
"type": "string", | |
"title": "address_id", | |
"description": "The ID of the associated address." | |
}, | |
"address": { | |
"$ref": "#/components/schemas/AdminStockLocationAddress" | |
}, | |
"sales_channels": { | |
"type": "array", | |
"description": "The sales channels associated with the location.", | |
"items": { | |
"$ref": "#/components/schemas/AdminSalesChannel" | |
} | |
}, | |
"fulfillment_providers": { | |
"type": "array", | |
"description": "The fulfillment providers associated with the location.", | |
"items": { | |
"$ref": "#/components/schemas/AdminFulfillmentProvider" | |
} | |
}, | |
"fulfillment_sets": { | |
"type": "array", | |
"description": "The fulfillment sets associated with the location.", | |
"items": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"AdminStockLocationAddress": { | |
"type": "object", | |
"description": "The details of the stock location address.", | |
"x-schemaName": "AdminStockLocationAddress", | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The address's ID." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code.", | |
"example": "us" | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The address's phone." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
} | |
}, | |
"required": [ | |
"id", | |
"address_1", | |
"address_2", | |
"company", | |
"country_code", | |
"city", | |
"phone", | |
"postal_code", | |
"province" | |
] | |
}, | |
"AdminStockLocationDeleteResponse": { | |
"type": "object", | |
"description": "The details of the stock location's deletion.", | |
"x-schemaName": "AdminStockLocationDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The stock location's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "stock_location" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the stock location was deleted." | |
} | |
} | |
}, | |
"AdminStockLocationListResponse": { | |
"type": "object", | |
"description": "The paginated list of stock locations.", | |
"x-schemaName": "AdminStockLocationListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"stock_locations" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"stock_locations": { | |
"type": "array", | |
"description": "The list of stock locations.", | |
"items": { | |
"$ref": "#/components/schemas/AdminStockLocation" | |
} | |
} | |
} | |
}, | |
"AdminStockLocationResponse": { | |
"type": "object", | |
"description": "The stock location's details.", | |
"x-schemaName": "AdminStockLocationResponse", | |
"required": [ | |
"stock_location" | |
], | |
"properties": { | |
"stock_location": { | |
"$ref": "#/components/schemas/AdminStockLocation" | |
} | |
} | |
}, | |
"AdminStore": { | |
"type": "object", | |
"description": "The store's details.", | |
"x-schemaName": "AdminStore", | |
"required": [ | |
"id", | |
"name", | |
"supported_currencies", | |
"default_sales_channel_id", | |
"default_region_id", | |
"default_location_id", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The store's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The store's name." | |
}, | |
"supported_currencies": { | |
"type": "array", | |
"description": "The store's supported currencies.", | |
"items": { | |
"$ref": "#/components/schemas/AdminStoreCurrency" | |
} | |
}, | |
"default_sales_channel_id": { | |
"type": "string", | |
"title": "default_sales_channel_id", | |
"description": "The ID of the sales channel used by default in the store." | |
}, | |
"default_region_id": { | |
"type": "string", | |
"title": "default_region_id", | |
"description": "The ID of the region used by default in the store." | |
}, | |
"default_location_id": { | |
"type": "string", | |
"title": "default_location_id", | |
"description": "The ID of the stock location used by default in the store." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The store's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the store was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the store was updated." | |
} | |
} | |
}, | |
"AdminStoreCurrency": { | |
"type": "object", | |
"description": "The details of a store's currency.", | |
"x-schemaName": "AdminStoreCurrency", | |
"required": [ | |
"id", | |
"currency_code", | |
"store_id", | |
"is_default", | |
"currency", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The currency's ID." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The currency's code.", | |
"example": "usd" | |
}, | |
"store_id": { | |
"type": "string", | |
"title": "store_id", | |
"description": "The ID of the store this currency belongs to." | |
}, | |
"is_default": { | |
"type": "boolean", | |
"title": "is_default", | |
"description": "Whether this currency is the default in the store." | |
}, | |
"currency": { | |
"$ref": "#/components/schemas/AdminCurrency" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the currency was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the currency was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the currency was deleted." | |
} | |
} | |
}, | |
"AdminStoreListResponse": { | |
"type": "object", | |
"description": "The paginated list of stores.", | |
"x-schemaName": "AdminStoreListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"stores" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"stores": { | |
"type": "array", | |
"description": "The list of stores.", | |
"items": { | |
"$ref": "#/components/schemas/AdminStore" | |
} | |
} | |
} | |
}, | |
"AdminStoreResponse": { | |
"type": "object", | |
"description": "The store's details.", | |
"x-schemaName": "AdminStoreResponse", | |
"required": [ | |
"store" | |
], | |
"properties": { | |
"store": { | |
"$ref": "#/components/schemas/AdminStore" | |
} | |
} | |
}, | |
"AdminTaxRate": { | |
"type": "object", | |
"description": "The tax rate's details.", | |
"x-schemaName": "AdminTaxRate", | |
"required": [ | |
"id", | |
"rate", | |
"code", | |
"name", | |
"metadata", | |
"tax_region_id", | |
"is_combinable", | |
"is_default", | |
"created_at", | |
"updated_at", | |
"deleted_at", | |
"created_by", | |
"tax_region", | |
"rules" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tax rate's ID." | |
}, | |
"rate": { | |
"type": "number", | |
"title": "rate", | |
"description": "The rate to charge.", | |
"example": 10 | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The code the tax rate is identified by." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The tax rate's name." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The tax rate's metadata, can hold custom key-value pairs." | |
}, | |
"tax_region_id": { | |
"type": "string", | |
"title": "tax_region_id", | |
"description": "The ID of the tax region this rate belongs to." | |
}, | |
"is_combinable": { | |
"type": "boolean", | |
"title": "is_combinable", | |
"description": "Whether the tax rate should be combined with parent rates.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates" | |
} | |
}, | |
"is_default": { | |
"type": "boolean", | |
"title": "is_default", | |
"description": "Whether this tax rate is the default in the tax region." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the tax rate was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the tax rate was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the tax rate was deleted." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created the tax rate." | |
}, | |
"tax_region": { | |
"$ref": "#/components/schemas/AdminTaxRegion" | |
}, | |
"rules": { | |
"type": "array", | |
"description": "The tax rate's rules.", | |
"items": { | |
"$ref": "#/components/schemas/AdminTaxRateRule" | |
} | |
} | |
} | |
}, | |
"AdminTaxRateDeleteResponse": { | |
"type": "object", | |
"description": "The details of the tax rate deletion.", | |
"x-schemaName": "AdminTaxRateDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tax rate's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "tax_rate" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the tax rate was deleted." | |
} | |
} | |
}, | |
"AdminTaxRateResponse": { | |
"type": "object", | |
"description": "The tax rate's details.", | |
"x-schemaName": "AdminTaxRateResponse", | |
"required": [ | |
"tax_rate" | |
], | |
"properties": { | |
"tax_rate": { | |
"$ref": "#/components/schemas/AdminTaxRate" | |
} | |
} | |
}, | |
"AdminTaxRateRule": { | |
"type": "object", | |
"description": "The tax rate rule's details.", | |
"x-schemaName": "AdminTaxRateRule", | |
"required": [ | |
"reference", | |
"reference_id" | |
], | |
"properties": { | |
"reference": { | |
"type": "string", | |
"title": "reference", | |
"description": "The name of the table this rule references.", | |
"example": "product_type" | |
}, | |
"reference_id": { | |
"type": "string", | |
"title": "reference_id", | |
"description": "The ID of a record in the table that this rule references.", | |
"example": "ptyp_1" | |
} | |
} | |
}, | |
"AdminTaxRegion": { | |
"type": "object", | |
"description": "The tax region's details.", | |
"x-schemaName": "AdminTaxRegion", | |
"required": [ | |
"id", | |
"country_code", | |
"province_code", | |
"metadata", | |
"parent_id", | |
"created_at", | |
"updated_at", | |
"deleted_at", | |
"created_by", | |
"tax_rates", | |
"parent", | |
"children" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tax region's ID." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The tax region's country code.", | |
"example": "us" | |
}, | |
"province_code": { | |
"type": "string", | |
"title": "province_code", | |
"description": "The tax region's province code." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The tax region's metadata, can hold custom key-value pairs." | |
}, | |
"parent_id": { | |
"type": "string", | |
"title": "parent_id", | |
"description": "The ID of the parent tax region." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the tax region was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the tax region was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the tax region was deleted." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created the tax region." | |
}, | |
"tax_rates": { | |
"type": "array", | |
"description": "The tax region's rates.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"parent": { | |
"type": "object" | |
}, | |
"children": { | |
"type": "array", | |
"description": "The tax region's children.", | |
"items": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"AdminTaxRegionDeleteResponse": { | |
"type": "object", | |
"description": "The details of the tax region deletion.", | |
"x-schemaName": "AdminTaxRegionDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tax region's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "tax_region" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the tax region was deleted." | |
} | |
} | |
}, | |
"AdminTaxRegionResponse": { | |
"type": "object", | |
"description": "The tax region's details.", | |
"x-schemaName": "AdminTaxRegionResponse", | |
"required": [ | |
"tax_region" | |
], | |
"properties": { | |
"tax_region": { | |
"$ref": "#/components/schemas/AdminTaxRegion" | |
} | |
} | |
}, | |
"AdminUpdateApiKey": { | |
"type": "object", | |
"description": "The details to update in an API key.", | |
"x-schemaName": "AdminUpdateApiKey", | |
"required": [ | |
"title" | |
], | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The API key's title." | |
} | |
} | |
}, | |
"AdminUpdateCollection": { | |
"type": "object", | |
"description": "The details to update in a collection.", | |
"x-schemaName": "AdminUpdateCollection", | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The collection's title." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The collection's handle." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The collection's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminUpdateCustomerGroup": { | |
"type": "object", | |
"description": "The details to update in a customer group.", | |
"x-schemaName": "AdminUpdateCustomerGroup", | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The customer group's name." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The customer group's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminUpdatePriceList": { | |
"type": "object", | |
"description": "the details to update in a price list.", | |
"x-schemaName": "AdminUpdatePriceList", | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The price list's title." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The price list's description." | |
}, | |
"starts_at": { | |
"type": "string", | |
"title": "starts_at", | |
"description": "The date the price list starts." | |
}, | |
"ends_at": { | |
"type": "string", | |
"title": "ends_at", | |
"description": "The date the price list ends." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The price list's status.", | |
"enum": [ | |
"active", | |
"draft" | |
] | |
}, | |
"type": { | |
"type": "string", | |
"description": "The price list's type.", | |
"enum": [ | |
"sale", | |
"override" | |
] | |
}, | |
"rules": { | |
"type": "object", | |
"description": "The price list's rules.", | |
"example": { | |
"customer_group_id": [ | |
"cusgrp_123" | |
] | |
} | |
} | |
} | |
}, | |
"AdminUpdatePricePreference": { | |
"type": "object", | |
"description": "The details to update in the price preference.", | |
"x-schemaName": "AdminUpdatePricePreference", | |
"properties": { | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The price preference's attribute.", | |
"example": "region_id" | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The price preference's value.", | |
"example": "reg_123" | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether prices are tax inclusive for this price preference." | |
} | |
} | |
}, | |
"AdminUpdateProduct": { | |
"type": "object", | |
"description": "The product's details.", | |
"x-schemaName": "AdminUpdateProduct", | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product's title." | |
}, | |
"subtitle": { | |
"type": "string", | |
"title": "subtitle", | |
"description": "The product's subtitle." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The product's description." | |
}, | |
"is_giftcard": { | |
"type": "boolean", | |
"title": "is_giftcard", | |
"description": "Whether the product is a gift card." | |
}, | |
"discountable": { | |
"type": "boolean", | |
"title": "discountable", | |
"description": "Whether discounts can be applied on the product." | |
}, | |
"images": { | |
"type": "array", | |
"description": "The product's images.", | |
"items": { | |
"type": "object", | |
"description": "The image's details.", | |
"required": [ | |
"url" | |
], | |
"properties": { | |
"url": { | |
"type": "string", | |
"title": "url", | |
"description": "The image's URL." | |
} | |
} | |
} | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The product's thumbnail URL." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The product's unique handle." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The product's status.", | |
"enum": [ | |
"draft", | |
"proposed", | |
"published", | |
"rejected" | |
] | |
}, | |
"type_id": { | |
"type": "string", | |
"title": "type_id", | |
"description": "The ID of the product's type." | |
}, | |
"collection_id": { | |
"type": "string", | |
"title": "collection_id", | |
"description": "The ID of the product's collection." | |
}, | |
"categories": { | |
"type": "array", | |
"description": "The product's categories.", | |
"items": { | |
"type": "object", | |
"description": "The product's category.", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The category's ID." | |
} | |
} | |
} | |
}, | |
"tags": { | |
"type": "array", | |
"description": "The product's tags.", | |
"items": { | |
"type": "object", | |
"description": "The product's tag.", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tag's ID." | |
} | |
} | |
} | |
}, | |
"options": { | |
"type": "array", | |
"description": "The product's options.", | |
"items": { | |
"$ref": "#/components/schemas/AdminUpdateProductOption" | |
} | |
}, | |
"variants": { | |
"type": "array", | |
"description": "The product's variants. You can add new variants or update existing ones, passing their IDs in the object.", | |
"items": { | |
"oneOf": [ | |
{ | |
"$ref": "#/components/schemas/AdminCreateProductVariant" | |
}, | |
{ | |
"$ref": "#/components/schemas/AdminUpdateProductVariant" | |
} | |
] | |
} | |
}, | |
"sales_channels": { | |
"type": "array", | |
"description": "The sales channels that the product is available in.", | |
"items": { | |
"type": "object", | |
"description": "The sales channel's details.", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The sales channel's ID." | |
} | |
} | |
} | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The product's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The product's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The product's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The product's width." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The product's HS code." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The product's MID code." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The product's origin country." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The product's material." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product's metadata, can hold custom key-value pairs." | |
}, | |
"external_id": { | |
"type": "string", | |
"title": "external_id", | |
"description": "The ID of the product in an external or third-party system." | |
} | |
} | |
}, | |
"AdminUpdateProductOption": { | |
"type": "object", | |
"description": "The details to update in a product option.", | |
"x-schemaName": "AdminUpdateProductOption", | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The option's title." | |
}, | |
"values": { | |
"type": "array", | |
"description": "The option's values.", | |
"items": { | |
"type": "string", | |
"title": "values", | |
"description": "An option value." | |
} | |
} | |
} | |
}, | |
"AdminUpdateProductVariant": { | |
"type": "object", | |
"description": "The properties to update of a product variant.", | |
"x-schemaName": "AdminUpdateProductVariant", | |
"properties": { | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product variant's title." | |
}, | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The product variant's SKU." | |
}, | |
"ean": { | |
"type": "string", | |
"title": "ean", | |
"description": "The product variant's EAN." | |
}, | |
"upc": { | |
"type": "string", | |
"title": "upc", | |
"description": "The product variant's UPC." | |
}, | |
"barcode": { | |
"type": "string", | |
"title": "barcode", | |
"description": "The product variant's barcode." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The product variant's HS code." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The product variant's MID code." | |
}, | |
"allow_backorder": { | |
"type": "boolean", | |
"title": "allow_backorder", | |
"description": "Whether customers can order the variant even if it's not in stock." | |
}, | |
"manage_inventory": { | |
"type": "boolean", | |
"title": "manage_inventory", | |
"description": "Whether the Medusa application manages the variant's inventory. If disabled, the product variant is always considered in stock." | |
}, | |
"variant_rank": { | |
"type": "number", | |
"title": "variant_rank", | |
"description": "The product variant's rank among its siblings." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The product variant's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The product variant's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The product variant's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The product variant's width." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The product variant's origin country." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The product variant's material." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product variant's metadata, can hold custom key-value pairs." | |
}, | |
"prices": { | |
"type": "array", | |
"description": "The product variant's prices.", | |
"items": { | |
"$ref": "#/components/schemas/AdminCreateProductVariantPrice" | |
} | |
}, | |
"options": { | |
"type": "object", | |
"description": "The product variant's options." | |
} | |
} | |
}, | |
"AdminUpdatePromotionRule": { | |
"type": "object", | |
"description": "The properties to update in a buy rule.", | |
"required": [ | |
"id", | |
"values" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The buy rule's ID." | |
}, | |
"operator": { | |
"type": "string", | |
"description": "The operator used to check whether the buy rule applies on a cart. For example, `eq` means that the cart's value for the specified attribute must match the specified value.", | |
"enum": [ | |
"gte", | |
"lte", | |
"gt", | |
"lt", | |
"eq", | |
"ne", | |
"in" | |
] | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The buy rule's description." | |
}, | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The attribute to compare against when checking whether a promotion can be applied on a cart.", | |
"example": "items.product.id" | |
}, | |
"values": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "values", | |
"description": "The attribute's value.", | |
"example": "prod_123" | |
}, | |
{ | |
"type": "array", | |
"description": "The allowed attribute values.", | |
"items": { | |
"type": "string", | |
"title": "values", | |
"description": "An attribute value.", | |
"example": "prod_123" | |
} | |
} | |
] | |
} | |
}, | |
"x-schemaName": "AdminUpdatePromotionRule" | |
}, | |
"AdminUpdateReturnReason": { | |
"type": "object", | |
"description": "The details to update in a return reason.", | |
"x-schemaName": "AdminUpdateReturnReason", | |
"properties": { | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The return reason's label." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The return reason's value." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The return reason's description." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The return reason's metadata, can hold custom key-value pairs." | |
} | |
}, | |
"required": [ | |
"value", | |
"label" | |
] | |
}, | |
"AdminUpdateSalesChannel": { | |
"type": "object", | |
"description": "The properties to update in the sales channel.", | |
"x-schemaName": "AdminUpdateSalesChannel", | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The sales channel's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The sales channel's description." | |
}, | |
"is_disabled": { | |
"type": "boolean", | |
"title": "is_disabled", | |
"description": "Whether the sales channel is disabled." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The sales channel's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminUpdateShippingOptionRule": { | |
"type": "object", | |
"description": "The properties to update in the shipping option rule.", | |
"required": [ | |
"id", | |
"operator", | |
"attribute", | |
"value" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The rule's ID." | |
}, | |
"operator": { | |
"type": "string", | |
"description": "The operator used to check whether a rule applies.", | |
"enum": [ | |
"in", | |
"eq", | |
"ne", | |
"gt", | |
"gte", | |
"lt", | |
"lte", | |
"nin" | |
] | |
}, | |
"attribute": { | |
"type": "string", | |
"title": "attribute", | |
"description": "The name of a property or table that the rule applies to.", | |
"example": "customer_group" | |
}, | |
"value": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "value", | |
"description": "A value of the attribute that enables this rule.", | |
"example": "cusgroup_123" | |
}, | |
{ | |
"type": "array", | |
"description": "Values of the attribute that enable this rule.", | |
"items": { | |
"type": "string", | |
"title": "value", | |
"description": "A value of the attribute that enables this rule.", | |
"example": "cusgroup_123" | |
} | |
} | |
] | |
} | |
}, | |
"x-schemaName": "AdminUpdateShippingOptionRule" | |
}, | |
"AdminUpdateStockLocation": { | |
"type": "object", | |
"description": "The properties to update in a stock location.", | |
"x-schemaName": "AdminUpdateStockLocation", | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The stock location's name." | |
}, | |
"address": { | |
"type": "object", | |
"description": "The stock location's address. Pass this property if you're creating a new address to associate with the location.", | |
"required": [ | |
"address_1", | |
"country_code" | |
], | |
"properties": { | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code.", | |
"example": "us" | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The address's phone." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
} | |
} | |
}, | |
"address_id": { | |
"type": "string", | |
"title": "address_id", | |
"description": "The ID of an existing stock location address to associate the stock location with." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The stock location's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminUpdateStore": { | |
"type": "object", | |
"description": "The properties to update in a store.", | |
"x-schemaName": "AdminUpdateStore", | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The store's name." | |
}, | |
"supported_currencies": { | |
"type": "array", | |
"description": "The store's supported currencies.", | |
"items": { | |
"type": "object", | |
"description": "A store currency.", | |
"required": [ | |
"currency_code" | |
], | |
"properties": { | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The currency's code.", | |
"example": "usd" | |
}, | |
"is_default": { | |
"type": "boolean", | |
"title": "is_default", | |
"description": "Whether the currency is the default in the store." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether prices using this currency are tax inclusive." | |
} | |
} | |
} | |
}, | |
"default_sales_channel_id": { | |
"type": "string", | |
"title": "default_sales_channel_id", | |
"description": "The ID of the default sales channel in the store." | |
}, | |
"default_region_id": { | |
"type": "string", | |
"title": "default_region_id", | |
"description": "The ID of the default region in the store." | |
}, | |
"default_location_id": { | |
"type": "string", | |
"title": "default_location_id", | |
"description": "The ID of the default stock location in the store." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The store's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminUpdateTaxRate": { | |
"type": "object", | |
"description": "The properties to update in the tax rate.", | |
"x-schemaName": "AdminUpdateTaxRate", | |
"properties": { | |
"rate": { | |
"type": "number", | |
"title": "rate", | |
"description": "The rate to charge." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The code that the tax rate is identified by." | |
}, | |
"rules": { | |
"type": "array", | |
"description": "The tax rate's rules.", | |
"items": { | |
"type": "object", | |
"description": "A tax rate rule.", | |
"required": [ | |
"reference", | |
"reference_id" | |
], | |
"properties": { | |
"reference": { | |
"type": "string", | |
"title": "reference", | |
"description": "The name of the table this rule references.", | |
"example": "product_type" | |
}, | |
"reference_id": { | |
"type": "string", | |
"title": "reference_id", | |
"description": "The ID of the record in the table that the rule references.", | |
"example": "ptyp_123" | |
} | |
} | |
} | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The tax rate's name." | |
}, | |
"is_default": { | |
"type": "boolean", | |
"title": "is_default", | |
"description": "Whether the tax rate is the default in the store." | |
}, | |
"is_combinable": { | |
"type": "boolean", | |
"title": "is_combinable", | |
"description": "Whether the tax rate should be combined with parent rates.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The tax rate's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminUpdateTaxRegion": { | |
"type": "object", | |
"description": "The details to update in a tax region.", | |
"x-schemaName": "AdminUpdateTaxRegion", | |
"properties": { | |
"province_code": { | |
"type": "string", | |
"title": "province_code", | |
"description": "The tax region's province code." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The tax region's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminUpdateUser": { | |
"type": "object", | |
"description": "The properties to update in a user.", | |
"x-schemaName": "AdminUpdateUser", | |
"properties": { | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The user's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The user's last name." | |
}, | |
"avatar_url": { | |
"type": "string", | |
"title": "avatar_url", | |
"description": "The URL of the user's avatar." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The user's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"AdminUpdateVariantInventoryItem": { | |
"type": "object", | |
"description": "The properties to update of the variant's inventory item association.", | |
"x-schemaName": "AdminUpdateVariantInventoryItem", | |
"required": [ | |
"required_quantity" | |
], | |
"properties": { | |
"required_quantity": { | |
"type": "number", | |
"title": "required_quantity", | |
"description": "The number of units a single quantity is equivalent to. For example, if a customer orders one quantity of the variant, Medusa checks the availability of the quantity multiplied by the value set for `required_quantity`. When the customer orders the quantity, Medusa reserves the ordered quantity multiplied by the value set for `required_quantity`." | |
} | |
} | |
}, | |
"AdminUpsertStockLocationAddress": { | |
"type": "object", | |
"description": "The details of the stock location address to create.", | |
"x-schemaName": "AdminUpsertStockLocationAddress", | |
"required": [ | |
"address_1", | |
"country_code" | |
], | |
"properties": { | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code.", | |
"example": "usd" | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The address's phone." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
} | |
} | |
}, | |
"AdminUser": { | |
"type": "object", | |
"description": "The user's details.", | |
"x-schemaName": "AdminUser", | |
"required": [ | |
"id", | |
"email", | |
"first_name", | |
"last_name", | |
"avatar_url", | |
"metadata", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The user's ID." | |
}, | |
"email": { | |
"type": "string", | |
"title": "email", | |
"description": "The user's email.", | |
"format": "email" | |
}, | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The user's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The user's last name." | |
}, | |
"avatar_url": { | |
"type": "string", | |
"title": "avatar_url", | |
"description": "The URL of the user's avatar." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The user's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the user was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the user was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the user was deleted." | |
} | |
} | |
}, | |
"AdminUserDeleteResponse": { | |
"type": "object", | |
"description": "The details of the deleted user.", | |
"x-schemaName": "AdminUserDeleteResponse", | |
"required": [ | |
"id", | |
"object", | |
"deleted" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The user's ID." | |
}, | |
"object": { | |
"type": "string", | |
"title": "object", | |
"description": "The name of the deleted object.", | |
"default": "user" | |
}, | |
"deleted": { | |
"type": "boolean", | |
"title": "deleted", | |
"description": "Whether the user was deleted." | |
} | |
} | |
}, | |
"AdminUserListResponse": { | |
"type": "object", | |
"description": "The paginated list of users.", | |
"x-schemaName": "AdminUserListResponse", | |
"required": [ | |
"limit", | |
"offset", | |
"count", | |
"users" | |
], | |
"properties": { | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The maximum number of items returned." | |
}, | |
"offset": { | |
"type": "number", | |
"title": "offset", | |
"description": "The number of items skipped before retrieving the returned items." | |
}, | |
"count": { | |
"type": "number", | |
"title": "count", | |
"description": "The total number of items." | |
}, | |
"users": { | |
"type": "array", | |
"description": "The list of users.", | |
"items": { | |
"$ref": "#/components/schemas/AdminUser" | |
} | |
} | |
} | |
}, | |
"AdminUserResponse": { | |
"type": "object", | |
"description": "The user's details.", | |
"x-schemaName": "AdminUserResponse", | |
"required": [ | |
"user" | |
], | |
"properties": { | |
"user": { | |
"$ref": "#/components/schemas/AdminUser" | |
} | |
} | |
}, | |
"AdminWorkflowExecution": { | |
"type": "object", | |
"description": "The workflows execution's details.", | |
"x-schemaName": "AdminWorkflowExecution", | |
"required": [ | |
"id", | |
"workflow_id", | |
"transaction_id", | |
"execution", | |
"context", | |
"state", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The workflow execution's ID." | |
}, | |
"workflow_id": { | |
"type": "string", | |
"title": "workflow_id", | |
"description": "The ID of the workflow." | |
}, | |
"transaction_id": { | |
"type": "string", | |
"title": "transaction_id", | |
"description": "The workflow execution's transaction ID." | |
}, | |
"execution": { | |
"$ref": "#/components/schemas/AdminWorkflowExecutionExecution" | |
}, | |
"context": { | |
"$ref": "#/components/schemas/WorkflowExecutionContext" | |
}, | |
"state": { | |
"type": "string", | |
"description": "The workflow execution's state.", | |
"enum": [ | |
"not_started", | |
"invoking", | |
"waiting_to_compensate", | |
"compensating", | |
"done", | |
"reverted", | |
"failed" | |
] | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the workflow execution was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the workflow execution was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the workflow execution was deleted." | |
} | |
} | |
}, | |
"AdminWorkflowExecutionExecution": { | |
"type": "object", | |
"description": "The workflow execution's steps details.", | |
"x-schemaName": "AdminWorkflowExecutionExecution", | |
"required": [ | |
"steps" | |
], | |
"properties": { | |
"steps": { | |
"type": "object", | |
"description": "The execution's steps. Each object key is a step ID, and the value is the object whose properties are shown below.", | |
"required": [ | |
"id", | |
"invoke", | |
"definition", | |
"compensate", | |
"depth", | |
"startedAt" | |
], | |
"additionalProperties": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The step's ID." | |
}, | |
"invoke": { | |
"type": "object", | |
"description": "The state of the step's invokation function.", | |
"x-schemaName": "WorkflowExecutionFn", | |
"properties": { | |
"state": { | |
"type": "string", | |
"description": "The invokation step's state.", | |
"enum": [ | |
"not_started", | |
"invoking", | |
"compensating", | |
"done", | |
"reverted", | |
"failed", | |
"dormant", | |
"skipped", | |
"skipped_failure", | |
"timeout" | |
] | |
}, | |
"status": { | |
"type": "string", | |
"description": "The invokation step's state.", | |
"enum": [ | |
"idle", | |
"ok", | |
"waiting_response", | |
"temp_failure", | |
"permanent_failure" | |
] | |
} | |
}, | |
"required": [ | |
"state", | |
"status" | |
] | |
}, | |
"definition": { | |
"type": "object", | |
"description": "The step's definition details.", | |
"x-schemaName": "WorkflowExecutionDefinition", | |
"properties": { | |
"async": { | |
"type": "boolean", | |
"title": "async", | |
"description": "Whether the step is async." | |
}, | |
"compensateAsync": { | |
"type": "boolean", | |
"title": "compensateAsync", | |
"description": "Whether the compensation function of the step is async." | |
}, | |
"noCompensation": { | |
"type": "boolean", | |
"title": "noCompensation", | |
"description": "Whether the step doesn't have a compensation function." | |
}, | |
"continueOnPermanentFailure": { | |
"type": "boolean", | |
"title": "continueOnPermanentFailure", | |
"description": "Whether the step continues executing even if its status is changed to failed." | |
}, | |
"maxRetries": { | |
"type": "number", | |
"title": "maxRetries", | |
"description": "The maximum number of times to retry the step." | |
}, | |
"noWait": { | |
"type": "boolean", | |
"title": "noWait", | |
"description": "Whether the workflow shouldn't wait for the step to finish before moving to the next step.", | |
"default": false | |
}, | |
"retryInterval": { | |
"type": "number", | |
"title": "retryInterval", | |
"description": "The interval in seconds between retry attempts when the step fails." | |
}, | |
"retryIntervalAwaiting": { | |
"type": "number", | |
"title": "retryIntervalAwaiting", | |
"description": "The interval in seconds to retry a step even if its status is `waiting_response`." | |
}, | |
"saveResponse": { | |
"type": "boolean", | |
"title": "saveResponse", | |
"description": "Whether the step's response is stored." | |
}, | |
"timeout": { | |
"type": "number", | |
"title": "timeout", | |
"description": "The maximum time in seconds to wait for this step to complete. If the step exceeds this time, the step's state is changed to `timeout`, but the step continues executing." | |
} | |
} | |
}, | |
"compensate": { | |
"type": "object", | |
"description": "The state of the step's compensation function.", | |
"x-schemaName": "WorkflowExecutionFn", | |
"properties": { | |
"state": { | |
"type": "string", | |
"description": "The compensation function's state.", | |
"enum": [ | |
"not_started", | |
"invoking", | |
"compensating", | |
"done", | |
"reverted", | |
"failed", | |
"dormant", | |
"skipped", | |
"skipped_failure", | |
"timeout" | |
] | |
}, | |
"status": { | |
"type": "string", | |
"description": "The compensation function's status.", | |
"enum": [ | |
"idle", | |
"ok", | |
"waiting_response", | |
"temp_failure", | |
"permanent_failure" | |
] | |
} | |
}, | |
"required": [ | |
"state", | |
"status" | |
] | |
}, | |
"depth": { | |
"type": "number", | |
"title": "depth", | |
"description": "The step's depth in the workflow's execution." | |
}, | |
"startedAt": { | |
"type": "number", | |
"title": "startedAt", | |
"description": "The timestamp the step started executing." | |
} | |
} | |
} | |
} | |
} | |
}, | |
"AdminWorkflowExecutionResponse": { | |
"type": "object", | |
"description": "The workflow execution's details.", | |
"x-schemaName": "AdminWorkflowExecutionResponse", | |
"required": [ | |
"workflow_execution" | |
], | |
"properties": { | |
"workflow_execution": { | |
"$ref": "#/components/schemas/AdminWorkflowExecution" | |
} | |
} | |
}, | |
"ApiKeyResponse": { | |
"type": "object", | |
"description": "The API key's details.", | |
"x-schemaName": "ApiKeyResponse", | |
"required": [ | |
"id", | |
"token", | |
"redacted", | |
"title", | |
"type", | |
"last_used_at", | |
"created_by", | |
"created_at", | |
"revoked_by", | |
"revoked_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The API key's ID." | |
}, | |
"token": { | |
"type": "string", | |
"title": "token", | |
"description": "The API key's token." | |
}, | |
"redacted": { | |
"type": "string", | |
"title": "redacted", | |
"description": "The redacted form of the API key's token. This is useful when showing portion of the token. For example `sk_...123`." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The API key's title." | |
}, | |
"type": { | |
"type": "string", | |
"description": "The API key's type. `secret` API keys are used for authenticating admin users, and `publishable` API key are used for storefronts and similar clients to scope requests to sales channels.", | |
"enum": [ | |
"secret", | |
"publishable" | |
] | |
}, | |
"last_used_at": { | |
"type": "string", | |
"title": "last_used_at", | |
"description": "The date the API key was last used.", | |
"format": "date-time" | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created the API key." | |
}, | |
"created_at": { | |
"type": "string", | |
"title": "created_at", | |
"description": "The date the API key was created.", | |
"format": "date-time" | |
}, | |
"revoked_by": { | |
"type": "string", | |
"title": "revoked_by", | |
"description": "The ID of the user that revoked the API key." | |
}, | |
"revoked_at": { | |
"type": "string", | |
"title": "revoked_at", | |
"description": "The date the API key was revoked.", | |
"format": "date-time" | |
} | |
} | |
}, | |
"AuthAdminSessionResponse": { | |
"type": "object", | |
"description": "The authenticated user's details.", | |
"x-schemaName": "AuthAdminSessionResponse", | |
"required": [ | |
"user" | |
], | |
"properties": { | |
"user": { | |
"title": "user", | |
"description": "The logged-in user.", | |
"$ref": "#/components/schemas/AdminUser" | |
} | |
} | |
}, | |
"AuthCallbackResponse": { | |
"type": "object", | |
"description": "The authentication's details.", | |
"x-schemaName": "AuthCallbackResponse", | |
"required": [ | |
"location" | |
], | |
"properties": { | |
"location": { | |
"type": "string", | |
"title": "location", | |
"description": "The location to redirect the user to for further authentication with the third-party provider." | |
} | |
} | |
}, | |
"AuthResponse": { | |
"type": "object", | |
"description": "The authentication's details.", | |
"x-schemaName": "AuthResponse", | |
"required": [ | |
"token" | |
], | |
"properties": { | |
"token": { | |
"type": "string", | |
"title": "token", | |
"description": "The JWT token used for registration or authentication." | |
} | |
} | |
}, | |
"AuthStoreSessionResponse": { | |
"type": "object", | |
"description": "The authenticated customer's details.", | |
"x-schemaName": "AuthStoreSessionResponse", | |
"required": [ | |
"user" | |
], | |
"properties": { | |
"user": { | |
"title": "user", | |
"description": "The logged-in customer.", | |
"$ref": "#/components/schemas/StoreCustomer" | |
} | |
} | |
}, | |
"BaseCalculatedPriceSet": { | |
"type": "object", | |
"description": "The calculated price's details.", | |
"x-schemaName": "BaseCalculatedPriceSet", | |
"required": [ | |
"id", | |
"calculated_amount", | |
"original_amount", | |
"currency_code" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The calculated price's ID." | |
}, | |
"is_calculated_price_price_list": { | |
"type": "boolean", | |
"title": "is_calculated_price_price_list", | |
"description": "Whether the calculated price belongs to a price list." | |
}, | |
"is_calculated_price_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_calculated_price_tax_inclusive", | |
"description": "Whether the calculated price is tax inclusive." | |
}, | |
"calculated_amount": { | |
"type": "number", | |
"title": "calculated_amount", | |
"description": "The amount of the calculated price, or `null` if there isn't a calculated price. This is the amount shown to the customer." | |
}, | |
"calculated_amount_with_tax": { | |
"type": "number", | |
"title": "calculated_amount_with_tax", | |
"description": "The calculated price's amount with taxes applied." | |
}, | |
"calculated_amount_without_tax": { | |
"type": "number", | |
"title": "calculated_amount_without_tax", | |
"description": "The calculated price's amount without taxes applied." | |
}, | |
"is_original_price_price_list": { | |
"type": "boolean", | |
"title": "is_original_price_price_list", | |
"description": "Whether the original price belongs to a price list." | |
}, | |
"is_original_price_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_original_price_tax_inclusive", | |
"description": "Whether the original price is tax inclusive." | |
}, | |
"original_amount": { | |
"type": "number", | |
"title": "original_amount", | |
"description": "The amount of the original price, or `null` if there isn't an original price. This amount is useful to compare with the `calculated_amount`, such as to check for discounted value." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The calculated price's currency code.", | |
"example": "usd" | |
}, | |
"calculated_price": { | |
"type": "object", | |
"description": "The calculated price's details." | |
}, | |
"original_price": { | |
"type": "object", | |
"description": "The original price's details." | |
} | |
} | |
}, | |
"BaseCapture": { | |
"type": "object", | |
"description": "The details of a captured payment.", | |
"x-schemaName": "BaseCapture", | |
"required": [ | |
"id", | |
"amount", | |
"created_at", | |
"payment" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment capture's ID." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The captured amount." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the capture was created." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that captured the payment." | |
}, | |
"payment": { | |
"type": "object" | |
} | |
} | |
}, | |
"BaseCart": { | |
"type": "object", | |
"description": "The item's cart.", | |
"x-schemaName": "BaseCart", | |
"required": [ | |
"id", | |
"currency_code", | |
"original_item_total", | |
"original_item_subtotal", | |
"original_item_tax_total", | |
"item_total", | |
"item_subtotal", | |
"item_tax_total", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"gift_card_total", | |
"gift_card_tax_total", | |
"shipping_total", | |
"shipping_subtotal", | |
"shipping_tax_total", | |
"original_shipping_total", | |
"original_shipping_subtotal", | |
"original_shipping_tax_total" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The cart's ID." | |
}, | |
"region": { | |
"$ref": "#/components/schemas/BaseRegion" | |
}, | |
"region_id": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The cart's region id." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "The cart's customer id." | |
}, | |
"sales_channel_id": { | |
"type": "string", | |
"title": "sales_channel_id", | |
"description": "The cart's sales channel id." | |
}, | |
"email": { | |
"type": "string", | |
"title": "email", | |
"description": "The cart's email.", | |
"format": "email" | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The cart's currency code." | |
}, | |
"shipping_address": { | |
"$ref": "#/components/schemas/BaseCartAddress" | |
}, | |
"billing_address": { | |
"$ref": "#/components/schemas/BaseCartAddress" | |
}, | |
"items": { | |
"type": "array", | |
"description": "The cart's items.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"shipping_methods": { | |
"type": "array", | |
"description": "The cart's shipping methods.", | |
"items": { | |
"$ref": "#/components/schemas/BaseCartShippingMethod" | |
} | |
}, | |
"payment_collection": { | |
"$ref": "#/components/schemas/BasePaymentCollection" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The cart's metadata." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The cart's created at." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The cart's updated at." | |
}, | |
"original_item_total": { | |
"type": "number", | |
"title": "original_item_total", | |
"description": "The cart's original item total." | |
}, | |
"original_item_subtotal": { | |
"type": "number", | |
"title": "original_item_subtotal", | |
"description": "The cart's original item subtotal." | |
}, | |
"original_item_tax_total": { | |
"type": "number", | |
"title": "original_item_tax_total", | |
"description": "The cart's original item tax total." | |
}, | |
"item_total": { | |
"type": "number", | |
"title": "item_total", | |
"description": "The cart's item total." | |
}, | |
"item_subtotal": { | |
"type": "number", | |
"title": "item_subtotal", | |
"description": "The cart's item subtotal." | |
}, | |
"item_tax_total": { | |
"type": "number", | |
"title": "item_tax_total", | |
"description": "The cart's item tax total." | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The cart's original total." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The cart's original subtotal." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The cart's original tax total." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The cart's total." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The cart's subtotal." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The cart's tax total." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The cart's discount total." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The cart's discount tax total." | |
}, | |
"gift_card_total": { | |
"type": "number", | |
"title": "gift_card_total", | |
"description": "The cart's gift card total." | |
}, | |
"gift_card_tax_total": { | |
"type": "number", | |
"title": "gift_card_tax_total", | |
"description": "The cart's gift card tax total." | |
}, | |
"shipping_total": { | |
"type": "number", | |
"title": "shipping_total", | |
"description": "The cart's shipping total." | |
}, | |
"shipping_subtotal": { | |
"type": "number", | |
"title": "shipping_subtotal", | |
"description": "The cart's shipping subtotal." | |
}, | |
"shipping_tax_total": { | |
"type": "number", | |
"title": "shipping_tax_total", | |
"description": "The cart's shipping tax total." | |
}, | |
"original_shipping_total": { | |
"type": "number", | |
"title": "original_shipping_total", | |
"description": "The cart's original shipping total." | |
}, | |
"original_shipping_subtotal": { | |
"type": "number", | |
"title": "original_shipping_subtotal", | |
"description": "The cart's original shipping subtotal." | |
}, | |
"original_shipping_tax_total": { | |
"type": "number", | |
"title": "original_shipping_tax_total", | |
"description": "The cart's original shipping tax total." | |
} | |
} | |
}, | |
"BaseCartAddress": { | |
"type": "object", | |
"description": "The cart's shipping address.", | |
"x-schemaName": "BaseCartAddress" | |
}, | |
"BaseCartLineItem": { | |
"type": "object", | |
"description": "The tax line's item.", | |
"x-schemaName": "BaseCartLineItem", | |
"required": [ | |
"id", | |
"title", | |
"quantity", | |
"requires_shipping", | |
"is_discountable", | |
"is_tax_inclusive", | |
"unit_price", | |
"cart", | |
"cart_id", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"item_total", | |
"item_subtotal", | |
"item_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The item's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The item's title." | |
}, | |
"subtitle": { | |
"type": "string", | |
"title": "subtitle", | |
"description": "The item's subtitle." | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The item's thumbnail." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"product": { | |
"$ref": "#/components/schemas/BaseProduct" | |
}, | |
"product_id": { | |
"type": "string", | |
"title": "product_id", | |
"description": "The item's product id." | |
}, | |
"product_title": { | |
"type": "string", | |
"title": "product_title", | |
"description": "The item's product title." | |
}, | |
"product_description": { | |
"type": "string", | |
"title": "product_description", | |
"description": "The item's product description." | |
}, | |
"product_subtitle": { | |
"type": "string", | |
"title": "product_subtitle", | |
"description": "The item's product subtitle." | |
}, | |
"product_type": { | |
"type": "string", | |
"title": "product_type", | |
"description": "The item's product type." | |
}, | |
"product_collection": { | |
"type": "string", | |
"title": "product_collection", | |
"description": "The item's product collection." | |
}, | |
"product_handle": { | |
"type": "string", | |
"title": "product_handle", | |
"description": "The item's product handle." | |
}, | |
"variant": { | |
"$ref": "#/components/schemas/BaseProductVariant" | |
}, | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The item's variant id." | |
}, | |
"variant_sku": { | |
"type": "string", | |
"title": "variant_sku", | |
"description": "The item's variant sku." | |
}, | |
"variant_barcode": { | |
"type": "string", | |
"title": "variant_barcode", | |
"description": "The item's variant barcode." | |
}, | |
"variant_title": { | |
"type": "string", | |
"title": "variant_title", | |
"description": "The item's variant title." | |
}, | |
"variant_option_values": { | |
"type": "object", | |
"description": "The item's variant option values." | |
}, | |
"requires_shipping": { | |
"type": "boolean", | |
"title": "requires_shipping", | |
"description": "The item's requires shipping." | |
}, | |
"is_discountable": { | |
"type": "boolean", | |
"title": "is_discountable", | |
"description": "The item's is discountable." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "The item's is tax inclusive." | |
}, | |
"compare_at_unit_price": { | |
"type": "number", | |
"title": "compare_at_unit_price", | |
"description": "The item's compare at unit price." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"tax_lines": { | |
"type": "array", | |
"description": "The item's tax lines.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"adjustments": { | |
"type": "array", | |
"description": "The item's adjustments.", | |
"items": { | |
"$ref": "#/components/schemas/BaseLineItemAdjustment" | |
} | |
}, | |
"cart": { | |
"$ref": "#/components/schemas/BaseCart" | |
}, | |
"cart_id": { | |
"type": "string", | |
"title": "cart_id", | |
"description": "The item's cart id." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The item's created at." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The item's updated at." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The item's deleted at." | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The item's original total." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The item's original subtotal." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The item's original tax total." | |
}, | |
"item_total": { | |
"type": "number", | |
"title": "item_total", | |
"description": "The item's item total." | |
}, | |
"item_subtotal": { | |
"type": "number", | |
"title": "item_subtotal", | |
"description": "The item's item subtotal." | |
}, | |
"item_tax_total": { | |
"type": "number", | |
"title": "item_tax_total", | |
"description": "The item's item tax total." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The item's total." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The item's subtotal." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The item's tax total." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The item's discount total." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The item's discount tax total." | |
} | |
} | |
}, | |
"BaseCartShippingMethod": { | |
"type": "object", | |
"description": "A cart's shipping method.", | |
"x-schemaName": "BaseCartShippingMethod", | |
"required": [ | |
"id", | |
"cart_id", | |
"name", | |
"amount", | |
"is_tax_inclusive", | |
"created_at", | |
"updated_at", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping method's ID." | |
}, | |
"cart_id": { | |
"type": "string", | |
"title": "cart_id", | |
"description": "The ID of the cart this shipping method belongs to." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The shipping method's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The shipping method's description." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The shipping method's amount." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether the shipping method's amount is tax inclusive." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the shipping option this method was created from." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The shipping method's data, useful for fulfillment handling by third-party services.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/cart/concepts#data-property" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The shipping method's metadata, can hold custom key-value pairs." | |
}, | |
"tax_lines": { | |
"type": "array", | |
"description": "The shipping method's tax lines.", | |
"items": { | |
"$ref": "#/components/schemas/BaseShippingMethodTaxLine" | |
} | |
}, | |
"adjustments": { | |
"type": "array", | |
"description": "The shipping method's adjustments, such as applied promotions.", | |
"items": { | |
"$ref": "#/components/schemas/BaseShippingMethodAdjustment" | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping method was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping method was updated." | |
}, | |
"original_total": { | |
"type": "string", | |
"title": "original_total", | |
"description": "The shipping method's total including taxes, excluding promotions." | |
}, | |
"original_subtotal": { | |
"type": "string", | |
"title": "original_subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "string", | |
"title": "original_tax_total", | |
"description": "The total taxes applied on the shipping method's amount including promotions." | |
}, | |
"total": { | |
"type": "string", | |
"title": "total", | |
"description": "The shipping method's total amount including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "string", | |
"title": "subtotal", | |
"description": "The shipping method's total amount excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "string", | |
"title": "tax_total", | |
"description": "The total taxes applied on the shipping method's amount including promotions." | |
}, | |
"discount_total": { | |
"type": "string", | |
"title": "discount_total", | |
"description": "The total amount discounted." | |
}, | |
"discount_tax_total": { | |
"type": "string", | |
"title": "discount_total", | |
"description": "The taxes applied on the discounted amount." | |
} | |
} | |
}, | |
"BaseClaimItem": { | |
"type": "object", | |
"description": "The claim item's details.", | |
"x-schemaName": "BaseClaimItem", | |
"required": [ | |
"id", | |
"claim_id", | |
"order_id", | |
"item_id", | |
"quantity", | |
"reason", | |
"raw_quantity" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The claim item's ID." | |
}, | |
"claim_id": { | |
"type": "string", | |
"title": "claim_id", | |
"description": "The ID of the claim this item belongs to." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this item belongs to." | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "item_id", | |
"description": "The ID of the item in the order." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The quantity claimed." | |
}, | |
"reason": { | |
"type": "string", | |
"description": "The claim's reason.", | |
"enum": [ | |
"missing_item", | |
"wrong_item", | |
"production_failure", | |
"other" | |
] | |
}, | |
"raw_quantity": { | |
"type": "object", | |
"description": "The quantity claimed.", | |
"properties": { | |
"value": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "value", | |
"description": "The raw quantity's value." | |
}, | |
{ | |
"type": "number", | |
"title": "value", | |
"description": "The raw quantity's value." | |
} | |
] | |
} | |
}, | |
"required": [ | |
"value" | |
] | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the claim was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the claim was updated." | |
} | |
} | |
}, | |
"BaseCollection": { | |
"type": "object", | |
"description": "The product collection's details.", | |
"x-schemaName": "BaseCollection", | |
"required": [ | |
"id", | |
"title", | |
"handle", | |
"created_at", | |
"updated_at", | |
"deleted_at", | |
"metadata" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The collection's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The collection's title." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The collection's handle." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The collection's creation date." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The collection's update date." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The collection's deletion date." | |
}, | |
"products": { | |
"type": "array", | |
"description": "The collection's products.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The collection's metadata, used to store custom key-value pairs." | |
} | |
} | |
}, | |
"BaseExchangeItem": { | |
"type": "object", | |
"description": "The item's details.", | |
"x-schemaName": "BaseExchangeItem", | |
"required": [ | |
"id", | |
"exchange_id", | |
"order_id", | |
"item_id", | |
"quantity", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The item's ID." | |
}, | |
"exchange_id": { | |
"type": "string", | |
"title": "exchange_id", | |
"description": "The ID of the exchange this item belongs to." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this item belongs to." | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "item_id", | |
"description": "The ID of the item in the order." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the item was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the item was updated." | |
} | |
} | |
}, | |
"BaseFulfillmentProvider": { | |
"type": "object", | |
"description": "The fulfillment provider's details.", | |
"x-schemaName": "BaseFulfillmentProvider", | |
"required": [ | |
"id", | |
"is_enabled" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The provider's ID." | |
}, | |
"is_enabled": { | |
"type": "boolean", | |
"title": "is_enabled", | |
"description": "Whether the provider is enabled." | |
} | |
} | |
}, | |
"BaseLineItemAdjustment": { | |
"type": "object", | |
"description": "The adjustment's details.", | |
"x-schemaName": "BaseLineItemAdjustment", | |
"properties": { | |
"item": { | |
"type": "object" | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "item_id", | |
"description": "The ID of the item this adjustment applies on." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The adjustment's ID." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The adjustment's code." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The adjustment's amount." | |
}, | |
"cart_id": { | |
"type": "string", | |
"title": "cart_id", | |
"description": "The ID of the cart this adjustment belongs to." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The adjustment's description." | |
}, | |
"promotion_id": { | |
"type": "string", | |
"title": "promotion_id", | |
"description": "The ID of the promotion applied by this adjustment." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The adjustment's provider ID." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the adjustment was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the adjustment was updated." | |
} | |
}, | |
"required": [ | |
"item", | |
"item_id", | |
"id", | |
"amount", | |
"cart_id", | |
"created_at", | |
"updated_at" | |
] | |
}, | |
"BaseLineItemTaxLine": { | |
"type": "object", | |
"description": "The tax line's details", | |
"x-schemaName": "BaseLineItemTaxLine", | |
"properties": { | |
"item": { | |
"$ref": "#/components/schemas/BaseCartLineItem" | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "item_id", | |
"description": "The ID of the item the tax line applies on." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The item's total, including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The item's subtotal excluding taxes, including promotions." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tax line's ID." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The tax line's description." | |
}, | |
"tax_rate_id": { | |
"type": "string", | |
"title": "tax_rate_id", | |
"description": "The ID of the associated tax rate." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The code the tax rate is identified by." | |
}, | |
"rate": { | |
"type": "number", | |
"title": "rate", | |
"description": "The rate to charge." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the tax provider." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the tax line was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the tax line was updated." | |
} | |
}, | |
"required": [ | |
"item", | |
"item_id", | |
"total", | |
"subtotal", | |
"id", | |
"code", | |
"rate", | |
"created_at", | |
"updated_at" | |
] | |
}, | |
"BaseOrder": { | |
"type": "object", | |
"description": "The order's details.", | |
"x-schemaName": "BaseOrder", | |
"required": [ | |
"id", | |
"version", | |
"region_id", | |
"customer_id", | |
"sales_channel_id", | |
"email", | |
"currency_code", | |
"items", | |
"shipping_methods", | |
"payment_status", | |
"fulfillment_status", | |
"summary", | |
"created_at", | |
"updated_at", | |
"original_item_total", | |
"original_item_subtotal", | |
"original_item_tax_total", | |
"item_total", | |
"item_subtotal", | |
"item_tax_total", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"gift_card_total", | |
"gift_card_tax_total", | |
"shipping_total", | |
"shipping_subtotal", | |
"shipping_tax_total", | |
"original_shipping_total", | |
"original_shipping_subtotal", | |
"original_shipping_tax_total" | |
], | |
"properties": { | |
"payment_collections": { | |
"type": "array", | |
"description": "The order's payment collections.", | |
"items": { | |
"$ref": "#/components/schemas/BasePaymentCollection" | |
} | |
}, | |
"fulfillments": { | |
"type": "array", | |
"description": "The order's fulfillments.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderFulfillment" | |
} | |
}, | |
"shipping_address": { | |
"$ref": "#/components/schemas/BaseOrderAddress" | |
}, | |
"billing_address": { | |
"$ref": "#/components/schemas/BaseOrderAddress" | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The order's ID." | |
}, | |
"version": { | |
"type": "number", | |
"title": "version", | |
"description": "The order's version." | |
}, | |
"region_id": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of the region associated with the order." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "The ID of the customer that placed the order." | |
}, | |
"sales_channel_id": { | |
"type": "string", | |
"title": "sales_channel_id", | |
"description": "The ID of the sales channel the order is placed in." | |
}, | |
"email": { | |
"type": "string", | |
"title": "email", | |
"description": "The email of the customer that placed the order.", | |
"format": "email" | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The order's currency code." | |
}, | |
"display_id": { | |
"type": "number", | |
"title": "display_id", | |
"description": "The order's display ID." | |
}, | |
"items": { | |
"type": "array", | |
"description": "The order's items.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderLineItem" | |
} | |
}, | |
"shipping_methods": { | |
"type": "array", | |
"description": "The order's shipping methods.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderShippingMethod" | |
} | |
}, | |
"payment_status": { | |
"type": "string", | |
"description": "The order's payment status.", | |
"enum": [ | |
"canceled", | |
"not_paid", | |
"awaiting", | |
"authorized", | |
"partially_authorized", | |
"captured", | |
"partially_captured", | |
"partially_refunded", | |
"refunded", | |
"requires_action" | |
] | |
}, | |
"fulfillment_status": { | |
"type": "string", | |
"description": "The order's fulfillment status.", | |
"enum": [ | |
"canceled", | |
"not_fulfilled", | |
"partially_fulfilled", | |
"fulfilled", | |
"partially_shipped", | |
"shipped", | |
"partially_delivered", | |
"delivered" | |
] | |
}, | |
"transactions": { | |
"type": "array", | |
"description": "The order's transactions.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderTransaction" | |
} | |
}, | |
"summary": { | |
"$ref": "#/components/schemas/BaseOrderSummary" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The order's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the order was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the order was updated." | |
}, | |
"original_item_total": { | |
"type": "number", | |
"title": "original_item_total", | |
"description": "The total of the order's items including taxes, excluding promotions." | |
}, | |
"original_item_subtotal": { | |
"type": "number", | |
"title": "original_item_subtotal", | |
"description": "The total of the order's items excluding taxes, including promotions." | |
}, | |
"original_item_tax_total": { | |
"type": "number", | |
"title": "original_item_tax_total", | |
"description": "The tax total of the order's items excluding promotions." | |
}, | |
"item_total": { | |
"type": "number", | |
"title": "item_total", | |
"description": "The total of the order's items including taxes and promotions." | |
}, | |
"item_subtotal": { | |
"type": "number", | |
"title": "item_subtotal", | |
"description": "The total of the order's items excluding taxes, including promotions." | |
}, | |
"item_tax_total": { | |
"type": "number", | |
"title": "item_tax_total", | |
"description": "The tax total of the order's items including promotions." | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The order's total excluding promotions, including taxes." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The order's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The order's tax total, excluding promotions." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The order's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The order's total excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The order's tax total including promotions." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The order's discount or promotions total." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The tax total of order's discount or promotion." | |
}, | |
"gift_card_total": { | |
"type": "number", | |
"title": "gift_card_total", | |
"description": "The order's gift card total." | |
}, | |
"gift_card_tax_total": { | |
"type": "number", | |
"title": "gift_card_tax_total", | |
"description": "The tax total of the order's gift card." | |
}, | |
"shipping_total": { | |
"type": "number", | |
"title": "shipping_total", | |
"description": "The order's shipping total including taxes and promotions." | |
}, | |
"shipping_subtotal": { | |
"type": "number", | |
"title": "shipping_subtotal", | |
"description": "The order's shipping total excluding taxes, including promotions." | |
}, | |
"shipping_tax_total": { | |
"type": "number", | |
"title": "shipping_tax_total", | |
"description": "The tax total of the order's shipping." | |
}, | |
"original_shipping_total": { | |
"type": "number", | |
"title": "original_shipping_total", | |
"description": "The order's shipping total including taxes, excluding promotions." | |
}, | |
"original_shipping_subtotal": { | |
"type": "number", | |
"title": "original_shipping_subtotal", | |
"description": "The order's shipping total excluding taxes, including promotions." | |
}, | |
"original_shipping_tax_total": { | |
"type": "number", | |
"title": "original_shipping_tax_total", | |
"description": "The tax total of the order's shipping excluding promotions." | |
} | |
} | |
}, | |
"BaseOrderAddress": { | |
"type": "object", | |
"description": "An order address.", | |
"x-schemaName": "BaseOrderAddress", | |
"required": [ | |
"id", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The address's ID." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "The ID of the customer this address belongs to." | |
}, | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The address's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The address's last name." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The address's phone." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code.", | |
"example": "us" | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The address's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the address was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the address was updated." | |
} | |
} | |
}, | |
"BaseOrderFulfillment": { | |
"type": "object", | |
"description": "The fulfillment's details.", | |
"x-schemaName": "BaseOrderFulfillment", | |
"required": [ | |
"id", | |
"location_id", | |
"packed_at", | |
"shipped_at", | |
"delivered_at", | |
"canceled_at", | |
"requires_shipping", | |
"data", | |
"provider_id", | |
"shipping_option_id", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The fulfillment's ID." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the location the items are fulfilled from." | |
}, | |
"packed_at": { | |
"type": "string", | |
"title": "packed_at", | |
"description": "The date the items were packed.", | |
"format": "date-time" | |
}, | |
"shipped_at": { | |
"type": "string", | |
"title": "shipped_at", | |
"description": "The date the items were shipped.", | |
"format": "date-time" | |
}, | |
"delivered_at": { | |
"type": "string", | |
"title": "delivered_at", | |
"description": "The date the items were delivered.", | |
"format": "date-time" | |
}, | |
"canceled_at": { | |
"type": "string", | |
"title": "canceled_at", | |
"description": "The date the items were canceled.", | |
"format": "date-time" | |
}, | |
"data": { | |
"type": "object", | |
"description": "Data useful for the fulfillment provider handling it. This is taken from the associated shipping option.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property" | |
} | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the fulfillment provider used to handle the fulfillment." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the associated shipping option." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The fulfillment's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the fulfillment was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the fulfillment was updated." | |
}, | |
"requires_shipping": { | |
"type": "boolean", | |
"title": "requires_shipping", | |
"description": "Whether the fulfillment requires shipping." | |
} | |
} | |
}, | |
"BaseOrderItemDetail": { | |
"type": "object", | |
"description": "The item's detail.", | |
"x-schemaName": "BaseOrderItemDetail", | |
"required": [ | |
"id", | |
"item_id", | |
"item", | |
"quantity", | |
"fulfilled_quantity", | |
"delivered_quantity", | |
"shipped_quantity", | |
"return_requested_quantity", | |
"return_received_quantity", | |
"return_dismissed_quantity", | |
"written_off_quantity", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "the detail's ID." | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "id", | |
"description": "the ID of the associated line item." | |
}, | |
"item": { | |
"type": "object" | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"fulfilled_quantity": { | |
"type": "number", | |
"title": "fulfilled_quantity", | |
"description": "The item's fulfilled quantity." | |
}, | |
"delivered_quantity": { | |
"type": "number", | |
"title": "fulfilled_quantity", | |
"description": "The item's delivered quantity." | |
}, | |
"shipped_quantity": { | |
"type": "number", | |
"title": "shipped_quantity", | |
"description": "The item's shipped quantity." | |
}, | |
"return_requested_quantity": { | |
"type": "number", | |
"title": "return_requested_quantity", | |
"description": "The item's quantity that's requested to be returned." | |
}, | |
"return_received_quantity": { | |
"type": "number", | |
"title": "return_received_quantity", | |
"description": "The item's quantity that's returned and added to the underlying variant's stocked quantity." | |
}, | |
"return_dismissed_quantity": { | |
"type": "number", | |
"title": "return_dismissed_quantity", | |
"description": "The item's quantity that's returned but damaged. So, it's not added to the underlying variant's stocked quantity." | |
}, | |
"written_off_quantity": { | |
"type": "number", | |
"title": "written_off_quantity", | |
"description": "The item's quantity that's removed from the order." | |
}, | |
"metadata": { | |
"type": "object", | |
"title": "metadata", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the detail was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the detail was updated." | |
} | |
} | |
}, | |
"BaseOrderLineItem": { | |
"type": "object", | |
"description": "The item's items.", | |
"x-schemaName": "BaseOrderLineItem", | |
"required": [ | |
"id", | |
"title", | |
"subtitle", | |
"thumbnail", | |
"variant_id", | |
"product_id", | |
"product_title", | |
"product_description", | |
"product_subtitle", | |
"product_type_id", | |
"product_type", | |
"product_collection", | |
"product_handle", | |
"variant_sku", | |
"variant_barcode", | |
"variant_title", | |
"variant_option_values", | |
"requires_shipping", | |
"is_discountable", | |
"is_tax_inclusive", | |
"unit_price", | |
"quantity", | |
"detail", | |
"created_at", | |
"updated_at", | |
"metadata", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"item_total", | |
"item_subtotal", | |
"item_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"refundable_total", | |
"refundable_total_per_unit" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The item's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The item's title." | |
}, | |
"subtitle": { | |
"type": "string", | |
"title": "subtitle", | |
"description": "The item's subtitle." | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The URL of the item's thumbnail." | |
}, | |
"variant": { | |
"$ref": "#/components/schemas/BaseProductVariant" | |
}, | |
"variant_id": { | |
"type": "string", | |
"title": "variant_id", | |
"description": "The ID of the associated variant." | |
}, | |
"product": { | |
"$ref": "#/components/schemas/BaseProduct" | |
}, | |
"product_id": { | |
"type": "string", | |
"title": "product_id", | |
"description": "The ID of the associated product." | |
}, | |
"product_title": { | |
"type": "string", | |
"title": "product_title", | |
"description": "The item's product title." | |
}, | |
"product_description": { | |
"type": "string", | |
"title": "product_description", | |
"description": "The item's product description." | |
}, | |
"product_subtitle": { | |
"type": "string", | |
"title": "product_subtitle", | |
"description": "The item's product subtitle." | |
}, | |
"product_type": { | |
"type": "string", | |
"title": "product_type", | |
"description": "The item's product type." | |
}, | |
"product_collection": { | |
"type": "string", | |
"title": "product_collection", | |
"description": "The ID of the collection the item's product belongs to." | |
}, | |
"product_handle": { | |
"type": "string", | |
"title": "product_handle", | |
"description": "The item's product handle." | |
}, | |
"variant_sku": { | |
"type": "string", | |
"title": "variant_sku", | |
"description": "The item's variant SKU." | |
}, | |
"variant_barcode": { | |
"type": "string", | |
"title": "variant_barcode", | |
"description": "The item's variant barcode." | |
}, | |
"variant_title": { | |
"type": "string", | |
"title": "variant_title", | |
"description": "The item's variant title." | |
}, | |
"variant_option_values": { | |
"type": "object", | |
"description": "The values of the item variant's options.", | |
"example": { | |
"Color": "Blue" | |
} | |
}, | |
"requires_shipping": { | |
"type": "boolean", | |
"title": "requires_shipping", | |
"description": "Whether the item requires shipping." | |
}, | |
"is_discountable": { | |
"type": "boolean", | |
"title": "is_discountable", | |
"description": "Whether the item is discountable." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether the item is tax inclusive." | |
}, | |
"compare_at_unit_price": { | |
"type": "number", | |
"title": "compare_at_unit_price", | |
"description": "The original price of the item before a promotion or sale." | |
}, | |
"unit_price": { | |
"type": "number", | |
"title": "unit_price", | |
"description": "The item's unit price." | |
}, | |
"quantity": { | |
"type": "number", | |
"title": "quantity", | |
"description": "The item's quantity." | |
}, | |
"tax_lines": { | |
"type": "array", | |
"description": "The item's tax lines.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderLineItemTaxLine" | |
} | |
}, | |
"adjustments": { | |
"type": "array", | |
"description": "The item's adjustments.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderLineItemAdjustment" | |
} | |
}, | |
"detail": { | |
"$ref": "#/components/schemas/BaseOrderItemDetail" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the item was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the item was updated." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The item's metadata, can hold custom key-value pairs." | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The item's total including taxes, excluding promotions." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The item's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The total taxes of the item, excluding promotions." | |
}, | |
"item_total": { | |
"type": "number", | |
"title": "item_total", | |
"description": "The total taxes of the item, including promotions." | |
}, | |
"item_subtotal": { | |
"type": "number", | |
"title": "item_subtotal", | |
"description": "The item's total excluding taxes, including promotions." | |
}, | |
"item_tax_total": { | |
"type": "number", | |
"title": "item_tax_total", | |
"description": "The total taxes of the item, including promotions." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The item's total, including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The item's subtotal excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The tax total of the item including promotions." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The total discount amount of the item." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The total taxes applied on the discounted amount." | |
}, | |
"refundable_total": { | |
"type": "number", | |
"title": "refundable_total", | |
"description": "The total refundable amount of the item's total." | |
}, | |
"refundable_total_per_unit": { | |
"type": "number", | |
"title": "refundable_total_per_unit", | |
"description": "The total refundable amount of the item's total for a single quantity." | |
}, | |
"product_type_id": { | |
"type": "string", | |
"title": "product_type_id", | |
"description": "The ID of the associated product's type." | |
} | |
} | |
}, | |
"BaseOrderLineItemAdjustment": { | |
"type": "object", | |
"description": "The adjustment's details.", | |
"x-schemaName": "BaseOrderLineItemAdjustment", | |
"properties": { | |
"item": { | |
"type": "object" | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "item_id", | |
"description": "The ID of the item this adjustment applies to." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The adjustment's ID." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The adjustment's code." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The adjustment's amount." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the associated order." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The adjustment's description." | |
}, | |
"promotion_id": { | |
"type": "string", | |
"title": "promotion_id", | |
"description": "The ID of the promotion that this applies on the order's item." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The adjustment's provider ID." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the adjustment was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the adjustment was updated." | |
} | |
}, | |
"required": [ | |
"item", | |
"item_id", | |
"id", | |
"amount", | |
"order_id", | |
"created_at", | |
"updated_at" | |
] | |
}, | |
"BaseOrderLineItemTaxLine": { | |
"type": "object", | |
"description": "The tax line's tax lines.", | |
"x-schemaName": "BaseOrderLineItemTaxLine", | |
"properties": { | |
"item": { | |
"type": "object" | |
}, | |
"item_id": { | |
"type": "string", | |
"title": "item_id", | |
"description": "The ID of the associated line item." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The tax line's total including promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The tax line's subtotal excluding promotions." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tax line's ID." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The tax line's description." | |
}, | |
"tax_rate_id": { | |
"type": "string", | |
"title": "tax_rate_id", | |
"description": "The ID of the applied tax rate." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The code that the tax rate is identified by." | |
}, | |
"rate": { | |
"type": "number", | |
"title": "rate", | |
"description": "The rate to charge." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the tax provider used to calculate the tax line." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the tax line was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the tax line was updated." | |
} | |
}, | |
"required": [ | |
"item", | |
"item_id", | |
"total", | |
"subtotal", | |
"id", | |
"code", | |
"rate", | |
"created_at", | |
"updated_at" | |
] | |
}, | |
"BaseOrderShippingDetail": { | |
"type": "object", | |
"description": "Details of changes to a shipping method.", | |
"x-schemaName": "BaseOrderShippingDetail", | |
"required": [ | |
"id", | |
"shipping_method_id", | |
"shipping_method", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The ID of the new changes to the shipping method." | |
}, | |
"shipping_method_id": { | |
"type": "string", | |
"title": "shipping_method_id", | |
"description": "The ID of the shipping method." | |
}, | |
"shipping_method": { | |
"type": "object" | |
}, | |
"claim_id": { | |
"type": "string", | |
"title": "claim_id", | |
"description": "The ID of the associated claim." | |
}, | |
"exchange_id": { | |
"type": "string", | |
"title": "exchange_id", | |
"description": "The ID of the associated exchange." | |
}, | |
"return_id": { | |
"type": "string", | |
"title": "return_id", | |
"description": "The ID of the associated return." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping method change was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping method change was updated." | |
} | |
} | |
}, | |
"BaseOrderShippingMethod": { | |
"type": "object", | |
"description": "The shipping method's details.", | |
"x-schemaName": "BaseOrderShippingMethod", | |
"required": [ | |
"id", | |
"order_id", | |
"name", | |
"amount", | |
"is_tax_inclusive", | |
"shipping_option_id", | |
"data", | |
"metadata", | |
"original_total", | |
"original_subtotal", | |
"original_tax_total", | |
"total", | |
"subtotal", | |
"tax_total", | |
"discount_total", | |
"discount_tax_total", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The shipping method's ID." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order the shipping method belongs to." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The shipping method's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The shipping method's description." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The shipping method's amount." | |
}, | |
"is_tax_inclusive": { | |
"type": "boolean", | |
"title": "is_tax_inclusive", | |
"description": "Whether the shipping method's amount includes applied taxes." | |
}, | |
"shipping_option_id": { | |
"type": "string", | |
"title": "shipping_option_id", | |
"description": "The ID of the shipping option this method was created from." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The shipping method's data, useful for fulfillment provider handling its fulfillment.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The shipping method's metadata, can hold custom key-value pairs." | |
}, | |
"tax_lines": { | |
"type": "array", | |
"description": "The shipping method's tax lines.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderShippingMethodTaxLine" | |
} | |
}, | |
"adjustments": { | |
"type": "array", | |
"description": "The shipping method's adjustments.", | |
"items": { | |
"$ref": "#/components/schemas/BaseOrderShippingMethodAdjustment" | |
} | |
}, | |
"original_total": { | |
"type": "number", | |
"title": "original_total", | |
"description": "The shipping method's total including taxes, excluding promotions." | |
}, | |
"original_subtotal": { | |
"type": "number", | |
"title": "original_subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
}, | |
"original_tax_total": { | |
"type": "number", | |
"title": "original_tax_total", | |
"description": "The shipping method's total taxes excluding promotions." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The shipping method's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
}, | |
"tax_total": { | |
"type": "number", | |
"title": "tax_total", | |
"description": "The shipping method's tax total including promotions." | |
}, | |
"discount_total": { | |
"type": "number", | |
"title": "discount_total", | |
"description": "The total discounts applied on the shipping method." | |
}, | |
"discount_tax_total": { | |
"type": "number", | |
"title": "discount_tax_total", | |
"description": "The taxes applied on the discount amount." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the shipping method was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the shipping method was updated." | |
}, | |
"detail": { | |
"$ref": "#/components/schemas/BaseOrderShippingDetail" | |
} | |
} | |
}, | |
"BaseOrderShippingMethodAdjustment": { | |
"type": "object", | |
"description": "The adjustment's adjustments.", | |
"x-schemaName": "BaseOrderShippingMethodAdjustment", | |
"properties": { | |
"shipping_method": { | |
"type": "object" | |
}, | |
"shipping_method_id": { | |
"type": "string", | |
"title": "shipping_method_id", | |
"description": "The ID of the shipping method this adjustment applies on." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The adjustment's ID." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The adjustment's code." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The adjustment's amount." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the associated order." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The adjustment's description." | |
}, | |
"promotion_id": { | |
"type": "string", | |
"title": "promotion_id", | |
"description": "The ID of the promotion applied by this adjustment." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The adjustment's provider ID." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the adjustment was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the adjustment was updated." | |
} | |
}, | |
"required": [ | |
"shipping_method", | |
"shipping_method_id", | |
"id", | |
"amount", | |
"order_id", | |
"created_at", | |
"updated_at" | |
] | |
}, | |
"BaseOrderShippingMethodTaxLine": { | |
"type": "object", | |
"description": "The tax line's details.", | |
"x-schemaName": "BaseOrderShippingMethodTaxLine", | |
"properties": { | |
"shipping_method": { | |
"type": "object" | |
}, | |
"shipping_method_id": { | |
"type": "string", | |
"title": "shipping_method_id", | |
"description": "The ID of the shipping method this tax line belongs to." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The shipping method's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The shipping method's total excluding taxes, including promotions." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tax line's ID." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The tax line's description." | |
}, | |
"tax_rate_id": { | |
"type": "string", | |
"title": "tax_rate_id", | |
"description": "The ID of the applied tax rate." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The code that the tax rate is identified by." | |
}, | |
"rate": { | |
"type": "number", | |
"title": "rate", | |
"description": "The rate to charge." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the tax provider handling the tax calculation." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the tax line was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the tax line was updated." | |
} | |
}, | |
"required": [ | |
"shipping_method", | |
"shipping_method_id", | |
"total", | |
"subtotal", | |
"id", | |
"code", | |
"rate", | |
"created_at", | |
"updated_at" | |
] | |
}, | |
"BaseOrderSummary": { | |
"type": "object", | |
"description": "The order's summary details.", | |
"x-schemaName": "BaseOrderSummary", | |
"required": [ | |
"total", | |
"subtotal", | |
"total_tax", | |
"ordered_total", | |
"fulfilled_total", | |
"returned_total", | |
"return_request_total", | |
"write_off_total", | |
"paid_total", | |
"refunded_total" | |
], | |
"properties": { | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The order's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The order's total excluding taxes, including promotions." | |
}, | |
"total_tax": { | |
"type": "number", | |
"title": "total_tax", | |
"description": "The order's total taxes." | |
}, | |
"ordered_total": { | |
"type": "number", | |
"title": "ordered_total", | |
"description": "The order's total when it was placed." | |
}, | |
"fulfilled_total": { | |
"type": "number", | |
"title": "fulfilled_total", | |
"description": "The total of the fulfilled items of the order." | |
}, | |
"returned_total": { | |
"type": "number", | |
"title": "returned_total", | |
"description": "The total of the order's returned items." | |
}, | |
"return_request_total": { | |
"type": "number", | |
"title": "return_request_total", | |
"description": "The total of the items requested to be returned." | |
}, | |
"write_off_total": { | |
"type": "number", | |
"title": "write_off_total", | |
"description": "The total of the items removed from the order." | |
}, | |
"paid_total": { | |
"type": "number", | |
"title": "paid_total", | |
"description": "The total amount paid." | |
}, | |
"refunded_total": { | |
"type": "number", | |
"title": "refunded_total", | |
"description": "The total amount refunded." | |
} | |
} | |
}, | |
"BaseOrderTransaction": { | |
"type": "object", | |
"description": "An order transaction's details.", | |
"x-schemaName": "BaseOrderTransaction", | |
"required": [ | |
"id", | |
"order_id", | |
"amount", | |
"currency_code", | |
"reference", | |
"reference_id", | |
"metadata", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The transaction's ID." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the order this transaction belongs to." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The transaction's amount." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The transaction's currency code.", | |
"example": "usd" | |
}, | |
"reference": { | |
"type": "string", | |
"title": "reference", | |
"description": "The name of a table that this transaction references. If this transaction is for captured payment, its value is `capture`. If this transaction is for refunded payment, its value is `refund`.", | |
"enum": [ | |
"capture", | |
"refund" | |
] | |
}, | |
"reference_id": { | |
"type": "string", | |
"title": "reference_id", | |
"description": "The ID of the referenced record in the referenced table." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The transaction's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date that the transaction was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date that the transaction was updated." | |
} | |
} | |
}, | |
"BasePayment": { | |
"type": "object", | |
"description": "The payment's details.", | |
"x-schemaName": "BasePayment", | |
"required": [ | |
"id", | |
"amount", | |
"currency_code", | |
"provider_id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment's ID." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The payment's amount." | |
}, | |
"authorized_amount": { | |
"type": "number", | |
"title": "authorized_amount", | |
"description": "The amount authorized of the payment." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The payment's currency code." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the payment provider used to process this payment." | |
}, | |
"cart_id": { | |
"type": "string", | |
"title": "cart_id", | |
"description": "The ID of the associated cart." | |
}, | |
"order_id": { | |
"type": "string", | |
"title": "order_id", | |
"description": "The ID of the associated order." | |
}, | |
"order_edit_id": { | |
"type": "string", | |
"title": "order_edit_id", | |
"description": "The ID of the associated order edit." | |
}, | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "ID of the associated customer." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The payment's data, useful for processing by the payment provider.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment#whats-a-payment" | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the payment was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the payment was updated." | |
}, | |
"captured_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "captured_at", | |
"description": "The date the payment was captured." | |
}, | |
"canceled_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "canceled_at", | |
"description": "The date the payment was canceled." | |
}, | |
"captured_amount": { | |
"type": "number", | |
"title": "captured_amount", | |
"description": "The captured amount of the payment." | |
}, | |
"refunded_amount": { | |
"type": "number", | |
"title": "captured_amount", | |
"description": "The refunded amount of the payment." | |
}, | |
"captures": { | |
"type": "array", | |
"description": "The details of payment captures.", | |
"items": { | |
"$ref": "#/components/schemas/BaseCapture" | |
} | |
}, | |
"refunds": { | |
"type": "array", | |
"description": "The details of payment refunds.", | |
"items": { | |
"$ref": "#/components/schemas/BaseRefund" | |
} | |
}, | |
"payment_collection": { | |
"type": "object" | |
}, | |
"payment_session": { | |
"type": "object" | |
} | |
} | |
}, | |
"BasePaymentCollection": { | |
"type": "object", | |
"description": "The payment collection's details.", | |
"x-schemaName": "BasePaymentCollection", | |
"required": [ | |
"id", | |
"currency_code", | |
"region_id", | |
"amount", | |
"status", | |
"payment_providers" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment collection's ID." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The payment collection's currency code." | |
}, | |
"region_id": { | |
"type": "string", | |
"title": "region_id", | |
"description": "The ID of the region this payment collection is associated with." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The total amount to be paid." | |
}, | |
"authorized_amount": { | |
"type": "number", | |
"title": "authorized_amount", | |
"description": "The total authorized amount of the collection's payments." | |
}, | |
"captured_amount": { | |
"type": "number", | |
"title": "captured_amount", | |
"description": "The total captured amount of the collection's payments." | |
}, | |
"refunded_amount": { | |
"type": "number", | |
"title": "refunded_amount", | |
"description": "The total refunded amount of the collection's payments." | |
}, | |
"completed_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "completed_at", | |
"description": "The date the payment collection was completed." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the payment collection was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the payment collection was updated." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The payment collection's metadata, can hold custom key-value pairs." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The payment collection's status.", | |
"enum": [ | |
"canceled", | |
"not_paid", | |
"awaiting", | |
"authorized", | |
"partially_authorized" | |
] | |
}, | |
"payment_providers": { | |
"type": "array", | |
"description": "The payment provider used to process the collection's payments and sessions.", | |
"items": { | |
"$ref": "#/components/schemas/BasePaymentProvider" | |
} | |
}, | |
"payment_sessions": { | |
"type": "array", | |
"description": "The payment collection's payment sessions.", | |
"items": { | |
"$ref": "#/components/schemas/BasePaymentSession" | |
} | |
}, | |
"payments": { | |
"type": "array", | |
"description": "The payment collection's payments.", | |
"items": { | |
"$ref": "#/components/schemas/BasePayment" | |
} | |
} | |
} | |
}, | |
"BasePaymentProvider": { | |
"type": "object", | |
"description": "The payment provider's details.", | |
"x-schemaName": "BasePaymentProvider", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment provider's ID." | |
} | |
} | |
}, | |
"BasePaymentSession": { | |
"type": "object", | |
"description": "The payment session's details.", | |
"x-schemaName": "BasePaymentSession", | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The payment session's ID." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The payment session's amount." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The payment session's currency code.", | |
"example": "usd" | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the payment provider processing this session." | |
}, | |
"data": { | |
"type": "object", | |
"description": "The payment session's data, useful for the payment provider processing the payment.", | |
"externalDocs": { | |
"url": "https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment-session#data-property" | |
} | |
}, | |
"context": { | |
"type": "object", | |
"description": "The context around the payment, such as the customer's details.", | |
"example": { | |
"customer": { | |
"id": "cus_123" | |
} | |
} | |
}, | |
"status": { | |
"type": "string", | |
"description": "The payment session's status.", | |
"enum": [ | |
"authorized", | |
"captured", | |
"canceled", | |
"pending", | |
"requires_more", | |
"error" | |
] | |
}, | |
"authorized_at": { | |
"type": "string", | |
"title": "authorized_at", | |
"description": "The date the payment session was authorized.", | |
"format": "date-time" | |
}, | |
"payment_collection": { | |
"type": "object" | |
}, | |
"payment": { | |
"$ref": "#/components/schemas/BasePayment" | |
} | |
}, | |
"required": [ | |
"id", | |
"amount", | |
"currency_code", | |
"provider_id", | |
"data", | |
"status" | |
] | |
}, | |
"BaseProduct": { | |
"type": "object", | |
"description": "The product's details.", | |
"x-schemaName": "BaseProduct", | |
"required": [ | |
"id", | |
"title", | |
"handle", | |
"subtitle", | |
"description", | |
"is_giftcard", | |
"status", | |
"thumbnail", | |
"width", | |
"weight", | |
"length", | |
"height", | |
"origin_country", | |
"hs_code", | |
"mid_code", | |
"material", | |
"collection_id", | |
"type_id", | |
"variants", | |
"options", | |
"images", | |
"discountable", | |
"external_id", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"collection": { | |
"$ref": "#/components/schemas/BaseCollection" | |
}, | |
"categories": { | |
"type": "array", | |
"description": "The product's categories.", | |
"items": { | |
"$ref": "#/components/schemas/BaseProductCategory" | |
} | |
}, | |
"variants": { | |
"type": "array", | |
"description": "The product's variants.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"type": { | |
"$ref": "#/components/schemas/BaseProductType" | |
}, | |
"tags": { | |
"type": "array", | |
"description": "The product's tags.", | |
"items": { | |
"$ref": "#/components/schemas/BaseProductTag" | |
} | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The product's length." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product's title." | |
}, | |
"status": { | |
"type": "string", | |
"description": "The product's status.", | |
"enum": [ | |
"draft", | |
"proposed", | |
"published", | |
"rejected" | |
] | |
}, | |
"options": { | |
"type": "array", | |
"description": "The product's options.", | |
"items": { | |
"$ref": "#/components/schemas/BaseProductOption" | |
} | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The product's description." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product's ID." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the product was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the product was updated." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The product's unique handle." | |
}, | |
"subtitle": { | |
"type": "string", | |
"title": "subtitle", | |
"description": "The product's subtitle." | |
}, | |
"is_giftcard": { | |
"type": "boolean", | |
"title": "is_giftcard", | |
"description": "Whether the product is a gift card." | |
}, | |
"thumbnail": { | |
"type": "string", | |
"title": "thumbnail", | |
"description": "The product's thumbnail." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The product's width." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The product's weight." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The product's height." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The product's origin country." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The product's HS code." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The product's MID code." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The product's material." | |
}, | |
"collection_id": { | |
"type": "string", | |
"title": "collection_id", | |
"description": "The ID of the collection that the product belongs to." | |
}, | |
"type_id": { | |
"type": "string", | |
"title": "type_id", | |
"description": "The ID of the product's type." | |
}, | |
"images": { | |
"type": "array", | |
"description": "The product's images.", | |
"items": { | |
"$ref": "#/components/schemas/BaseProductImage" | |
} | |
}, | |
"discountable": { | |
"type": "boolean", | |
"title": "discountable", | |
"description": "Whether discounts can be applied on the product." | |
}, | |
"external_id": { | |
"type": "string", | |
"title": "external_id", | |
"description": "The ID of a product in an external system, such as an ERP or CMS." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the product was deleted." | |
} | |
} | |
}, | |
"BaseProductCategory": { | |
"type": "object", | |
"description": "The product category's details.", | |
"x-schemaName": "BaseProductCategory", | |
"required": [ | |
"id", | |
"name", | |
"description", | |
"handle", | |
"is_active", | |
"is_internal", | |
"rank", | |
"parent_category_id", | |
"parent_category", | |
"category_children", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"category_children": { | |
"type": "array", | |
"description": "The category's children.", | |
"items": { | |
"$ref": "#/components/schemas/AdminProductCategory" | |
} | |
}, | |
"parent_category": { | |
"$ref": "#/components/schemas/AdminProductCategory" | |
}, | |
"products": { | |
"type": "array", | |
"description": "The category's products.", | |
"items": { | |
"type": "object" | |
} | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The category's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The category's description." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The category's ID." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The category's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the category was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the category was updated." | |
}, | |
"handle": { | |
"type": "string", | |
"title": "handle", | |
"description": "The category's unique handle." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the category was deleted." | |
}, | |
"is_active": { | |
"type": "boolean", | |
"title": "is_active", | |
"description": "Whether the category is active. If disabled, the category isn't shown in the storefront." | |
}, | |
"is_internal": { | |
"type": "boolean", | |
"title": "is_internal", | |
"description": "Whether the category is internal. If enabled, the category is only seen by admin users." | |
}, | |
"rank": { | |
"type": "number", | |
"title": "rank", | |
"description": "The category's rank among sibling categories." | |
}, | |
"parent_category_id": { | |
"type": "string", | |
"title": "parent_category_id", | |
"description": "The ID of the category's parent." | |
} | |
} | |
}, | |
"BaseProductImage": { | |
"type": "object", | |
"description": "The image's details.", | |
"x-schemaName": "BaseProductImage", | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The image's ID." | |
}, | |
"url": { | |
"type": "string", | |
"title": "url", | |
"description": "The image's URL." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the image was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the image was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the image was deleted." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The image's metadata, can hold custom key-value pairs." | |
} | |
}, | |
"required": [ | |
"id", | |
"url" | |
] | |
}, | |
"BaseProductOption": { | |
"type": "object", | |
"description": "The product option's details.", | |
"x-schemaName": "BaseProductOption", | |
"required": [ | |
"id", | |
"title" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The product option's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The product option's title." | |
}, | |
"product": { | |
"type": "object" | |
}, | |
"product_id": { | |
"type": "string", | |
"title": "product_id", | |
"description": "The ID of the product this option belongs to." | |
}, | |
"values": { | |
"type": "array", | |
"description": "The product option's values.", | |
"items": { | |
"$ref": "#/components/schemas/BaseProductOptionValue" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The product option's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the product option was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the product option was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the product option was deleted." | |
} | |
} | |
}, | |
"BaseProductOptionValue": { | |
"type": "object", | |
"description": "The product option value's details.", | |
"x-schemaName": "BaseProductOptionValue", | |
"required": [ | |
"id", | |
"value" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The value's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The value." | |
}, | |
"option": { | |
"type": "object" | |
}, | |
"option_id": { | |
"type": "string", | |
"title": "option_id", | |
"description": "The ID of the option this value belongs to." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The value's metadata, can hold custom key-value pairs." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the value was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the value was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the value was deleted." | |
} | |
} | |
}, | |
"BaseProductTag": { | |
"type": "object", | |
"description": "The product tag's details.", | |
"x-schemaName": "BaseProductTag", | |
"required": [ | |
"id", | |
"value", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tag's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The tag's value." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the tag was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the tag was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the tag was deleted." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The tag's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"BaseProductType": { | |
"type": "object", | |
"description": "The product type's details.", | |
"x-schemaName": "BaseProductType", | |
"required": [ | |
"id", | |
"value", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The type's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The type's value." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the type was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the type was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the type was deleted." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The type's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"BaseProductVariant": { | |
"type": "object", | |
"description": "The product variant's details.", | |
"x-schemaName": "BaseProductVariant", | |
"required": [ | |
"id", | |
"title", | |
"sku", | |
"barcode", | |
"ean", | |
"upc", | |
"allow_backorder", | |
"manage_inventory", | |
"hs_code", | |
"origin_country", | |
"mid_code", | |
"material", | |
"weight", | |
"length", | |
"height", | |
"width", | |
"options", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The variant's ID." | |
}, | |
"title": { | |
"type": "string", | |
"title": "title", | |
"description": "The variant's title." | |
}, | |
"sku": { | |
"type": "string", | |
"title": "sku", | |
"description": "The variant's SKU." | |
}, | |
"barcode": { | |
"type": "string", | |
"title": "barcode", | |
"description": "The variant's barcode." | |
}, | |
"ean": { | |
"type": "string", | |
"title": "ean", | |
"description": "The variant's EAN code." | |
}, | |
"upc": { | |
"type": "string", | |
"title": "upc", | |
"description": "The variant's UPC." | |
}, | |
"allow_backorder": { | |
"type": "boolean", | |
"title": "allow_backorder", | |
"description": "Whether the variant can be ordered even if it's out of stock." | |
}, | |
"manage_inventory": { | |
"type": "boolean", | |
"title": "manage_inventory", | |
"description": "Whether the Medusa application manages the variant's inventory quantity and availablility. If disabled, the variant is always considered in stock." | |
}, | |
"inventory_quantity": { | |
"type": "number", | |
"title": "inventory_quantity", | |
"description": "The variant's inventory quantity. This is only included if you pass in the `fields` query parameter a `+variants.inventory_quantity` parameter." | |
}, | |
"hs_code": { | |
"type": "string", | |
"title": "hs_code", | |
"description": "The variant's HS code." | |
}, | |
"origin_country": { | |
"type": "string", | |
"title": "origin_country", | |
"description": "The variant's origin country." | |
}, | |
"mid_code": { | |
"type": "string", | |
"title": "mid_code", | |
"description": "The variant's MID code." | |
}, | |
"material": { | |
"type": "string", | |
"title": "material", | |
"description": "The variant's material." | |
}, | |
"weight": { | |
"type": "number", | |
"title": "weight", | |
"description": "The variant's weight." | |
}, | |
"length": { | |
"type": "number", | |
"title": "length", | |
"description": "The variant's length." | |
}, | |
"height": { | |
"type": "number", | |
"title": "height", | |
"description": "The variant's height." | |
}, | |
"width": { | |
"type": "number", | |
"title": "width", | |
"description": "The variant's width." | |
}, | |
"variant_rank": { | |
"type": "number", | |
"title": "variant_rank", | |
"description": "The variant's rank among its sibling variants." | |
}, | |
"options": { | |
"type": "array", | |
"description": "The variant's option values.", | |
"items": { | |
"$ref": "#/components/schemas/BaseProductOptionValue" | |
} | |
}, | |
"product": { | |
"$ref": "#/components/schemas/BaseProduct" | |
}, | |
"product_id": { | |
"type": "string", | |
"title": "product_id", | |
"description": "The ID of the product that the variant belongs to." | |
}, | |
"calculated_price": { | |
"$ref": "#/components/schemas/BaseCalculatedPriceSet" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the variant was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the variant was updated." | |
}, | |
"deleted_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "deleted_at", | |
"description": "The date the variant was deleted." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The variant's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"BasePromotionRuleValue": { | |
"type": "object", | |
"description": "The rule value's details.", | |
"x-schemaName": "BasePromotionRuleValue", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The value's ID." | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The value." | |
} | |
} | |
}, | |
"BaseRefund": { | |
"type": "object", | |
"description": "The refund's details.", | |
"x-schemaName": "BaseRefund", | |
"required": [ | |
"id", | |
"amount", | |
"created_at", | |
"payment" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The refund's ID." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The refund's amount." | |
}, | |
"refund_reason_id": { | |
"type": "string", | |
"title": "refund_reason_id", | |
"description": "The ID of the refund reason." | |
}, | |
"note": { | |
"type": "string", | |
"title": "note", | |
"description": "More details about the refund." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the refund was created." | |
}, | |
"created_by": { | |
"type": "string", | |
"title": "created_by", | |
"description": "The ID of the user that created the refund." | |
}, | |
"payment": { | |
"type": "object" | |
}, | |
"refund_reason": { | |
"$ref": "#/components/schemas/RefundReason" | |
} | |
} | |
}, | |
"BaseRegion": { | |
"type": "object", | |
"description": "The region's details.", | |
"x-schemaName": "BaseRegion", | |
"required": [ | |
"id", | |
"name", | |
"currency_code" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The region's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The region's name." | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The region's currency code." | |
}, | |
"automatic_taxes": { | |
"type": "boolean", | |
"title": "automatic_taxes", | |
"description": "The region's automatic taxes." | |
}, | |
"countries": { | |
"type": "array", | |
"description": "The region's countries.", | |
"items": { | |
"$ref": "#/components/schemas/BaseRegionCountry" | |
} | |
}, | |
"payment_providers": { | |
"type": "array", | |
"description": "The region's payment providers.", | |
"items": { | |
"$ref": "#/components/schemas/AdminPaymentProvider" | |
} | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The region's metadata." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The region's created at." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The region's updated at." | |
} | |
} | |
}, | |
"BaseRegionCountry": { | |
"type": "object", | |
"description": "The country's details.", | |
"x-schemaName": "BaseRegionCountry", | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The country's ID." | |
}, | |
"iso_2": { | |
"type": "string", | |
"title": "iso_2", | |
"description": "The country's iso 2.", | |
"example": "us" | |
}, | |
"iso_3": { | |
"type": "string", | |
"title": "iso_3", | |
"description": "The country's iso 3.", | |
"example": "usa" | |
}, | |
"num_code": { | |
"type": "string", | |
"title": "num_code", | |
"description": "The country's num code.", | |
"example": 840 | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The country's name." | |
}, | |
"display_name": { | |
"type": "string", | |
"title": "display_name", | |
"description": "The country's display name." | |
} | |
}, | |
"required": [ | |
"id" | |
] | |
}, | |
"BaseRuleOperatorOptions": { | |
"type": "object", | |
"description": "The operator's details.", | |
"x-schemaName": "BaseRuleOperatorOptions", | |
"required": [ | |
"id", | |
"value", | |
"label" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The operator's ID.", | |
"example": "in" | |
}, | |
"value": { | |
"type": "string", | |
"title": "value", | |
"description": "The operator's value.", | |
"example": "in" | |
}, | |
"label": { | |
"type": "string", | |
"title": "label", | |
"description": "The operator's label.", | |
"example": "In" | |
} | |
} | |
}, | |
"BaseShippingMethodAdjustment": { | |
"type": "object", | |
"description": "The adjustment's details.", | |
"x-schemaName": "BaseShippingMethodAdjustment", | |
"required": [ | |
"shipping_method", | |
"shipping_method_id", | |
"id", | |
"amount", | |
"cart_id", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"shipping_method": { | |
"type": "object" | |
}, | |
"shipping_method_id": { | |
"type": "string", | |
"title": "shipping_method_id", | |
"description": "The ID of the shipping method the adjustment is applied on." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The adjustment's ID." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The adjustment's code." | |
}, | |
"amount": { | |
"type": "number", | |
"title": "amount", | |
"description": "The adjustment's amount." | |
}, | |
"cart_id": { | |
"type": "string", | |
"title": "cart_id", | |
"description": "The ID of the associated cart." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The adjustment's description." | |
}, | |
"promotion_id": { | |
"type": "string", | |
"title": "promotion_id", | |
"description": "The ID of the promotion applied by this adjustment." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The adjustment's provider ID." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the adjustment was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the adjustment was updated." | |
} | |
} | |
}, | |
"BaseShippingMethodTaxLine": { | |
"type": "object", | |
"description": "The tax line's details.", | |
"x-schemaName": "BaseShippingMethodTaxLine", | |
"required": [ | |
"shipping_method", | |
"shipping_method_id", | |
"total", | |
"subtotal", | |
"id", | |
"code", | |
"rate", | |
"created_at", | |
"updated_at" | |
], | |
"properties": { | |
"shipping_method": { | |
"type": "object" | |
}, | |
"shipping_method_id": { | |
"type": "string", | |
"title": "shipping_method_id", | |
"description": "The ID of this shipping method the tax line belongs to." | |
}, | |
"total": { | |
"type": "number", | |
"title": "total", | |
"description": "The method's total including taxes and promotions." | |
}, | |
"subtotal": { | |
"type": "number", | |
"title": "subtotal", | |
"description": "The method's total excluding taxes, including promotions." | |
}, | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The tax line's ID." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The tax line's description." | |
}, | |
"tax_rate_id": { | |
"type": "string", | |
"title": "tax_rate_id", | |
"description": "The ID of the applied tax rate." | |
}, | |
"code": { | |
"type": "string", | |
"title": "code", | |
"description": "The code that the rate is identified by." | |
}, | |
"rate": { | |
"type": "number", | |
"title": "rate", | |
"description": "The rate to charge." | |
}, | |
"provider_id": { | |
"type": "string", | |
"title": "provider_id", | |
"description": "The ID of the tax provider that calculated the taxes." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "created_at", | |
"description": "The date the tax line was created." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"title": "updated_at", | |
"description": "The date the tax line was updated." | |
} | |
} | |
}, | |
"CampaignResponse": { | |
"type": "object", | |
"description": "The campaign's details.", | |
"x-schemaName": "CampaignResponse", | |
"required": [ | |
"id", | |
"name", | |
"description", | |
"currency", | |
"campaign_identifier", | |
"starts_at", | |
"ends_at", | |
"budget" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The campaign's ID." | |
}, | |
"name": { | |
"type": "string", | |
"title": "name", | |
"description": "The campaign's name." | |
}, | |
"description": { | |
"type": "string", | |
"title": "description", | |
"description": "The campaign's description." | |
}, | |
"currency": { | |
"type": "string", | |
"title": "currency", | |
"description": "The campaign's currency." | |
}, | |
"campaign_identifier": { | |
"type": "string", | |
"title": "campaign_identifier", | |
"description": "The campaign's campaign identifier." | |
}, | |
"starts_at": { | |
"type": "string", | |
"title": "starts_at", | |
"description": "The campaign's starts at." | |
}, | |
"ends_at": { | |
"type": "string", | |
"title": "ends_at", | |
"description": "The campaign's ends at." | |
}, | |
"budget": { | |
"type": "object", | |
"description": "The campaign's budget.", | |
"required": [ | |
"id", | |
"type", | |
"currency_code", | |
"limit", | |
"used" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The budget's ID." | |
}, | |
"type": { | |
"type": "string", | |
"enum": [ | |
"spend", | |
"usage" | |
] | |
}, | |
"currency_code": { | |
"type": "string", | |
"title": "currency_code", | |
"description": "The budget's currency code." | |
}, | |
"limit": { | |
"type": "number", | |
"title": "limit", | |
"description": "The budget's limit." | |
}, | |
"used": { | |
"type": "number", | |
"title": "used", | |
"description": "The budget's used." | |
} | |
} | |
} | |
} | |
}, | |
"CreateAddress": { | |
"type": "object", | |
"description": "The address to create.", | |
"x-schemaName": "CreateAddress", | |
"properties": { | |
"customer_id": { | |
"type": "string", | |
"title": "customer_id", | |
"description": "The ID of the customer this address belongs to." | |
}, | |
"company": { | |
"type": "string", | |
"title": "company", | |
"description": "The address's company." | |
}, | |
"first_name": { | |
"type": "string", | |
"title": "first_name", | |
"description": "The address's first name." | |
}, | |
"last_name": { | |
"type": "string", | |
"title": "last_name", | |
"description": "The address's last name." | |
}, | |
"address_1": { | |
"type": "string", | |
"title": "address_1", | |
"description": "The address's first line." | |
}, | |
"address_2": { | |
"type": "string", | |
"title": "address_2", | |
"description": "The address's second line." | |
}, | |
"city": { | |
"type": "string", | |
"title": "city", | |
"description": "The address's city." | |
}, | |
"country_code": { | |
"type": "string", | |
"title": "country_code", | |
"description": "The address's country code.", | |
"example": "us" | |
}, | |
"province": { | |
"type": "string", | |
"title": "province", | |
"description": "The address's province." | |
}, | |
"postal_code": { | |
"type": "string", | |
"title": "postal_code", | |
"description": "The address's postal code." | |
}, | |
"phone": { | |
"type": "string", | |
"title": "phone", | |
"description": "The address's phone." | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "The address's metadata, can hold custom key-value pairs." | |
} | |
} | |
}, | |
"CustomerGroupInCustomerFilters": { | |
"type": "object", | |
"description": "Filter by customer groups to get their associated customers.", | |
"x-schemaName": "CustomerGroupInCustomerFilters", | |
"required": [ | |
"id", | |
"name", | |
"created_at", | |
"updated_at", | |
"deleted_at" | |
], | |
"properties": { | |
"id": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "id", | |
"description": "Filter by a group's ID." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by group IDs.", | |
"items": { | |
"type": "string", | |
"title": "id", | |
"description": "A group's ID." | |
} | |
} | |
] | |
}, | |
"name": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "name", | |
"description": "Filter by a group's name." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by group names.", | |
"items": { | |
"type": "string", | |
"title": "name", | |
"description": "A group's name." | |
} | |
} | |
] | |
}, | |
"created_at": { | |
"type": "object", | |
"description": "Filter by the group's creation date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "Filter by values in this array." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "Filter by values not in this array." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "Filter arrays that have overlapping values with this parameter." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "Filter arrays that contain some of the values of this parameter." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "Filter arrays that contain all values of this parameter." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
"updated_at": { | |
"type": "object", | |
"description": "Filter by the group's update date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "Filter by values in this array." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "Filter by values not in this array." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "Filter arrays that have overlapping values with this parameter." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "Filter arrays that contain some of the values of this parameter." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "Filter arrays that contain all values of this parameter." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
}, | |
"deleted_at": { | |
"type": "object", | |
"description": "Filter by the group's deletion date.", | |
"properties": { | |
"$and": { | |
"type": "array", | |
"description": "Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$and" | |
}, | |
"$or": { | |
"type": "array", | |
"description": "Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.", | |
"items": { | |
"type": "object" | |
}, | |
"title": "$or" | |
}, | |
"$eq": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by exact matches.", | |
"items": { | |
"type": "string", | |
"title": "$eq", | |
"description": "Filter by an exact match." | |
} | |
} | |
] | |
}, | |
"$ne": { | |
"type": "string", | |
"title": "$ne", | |
"description": "Filter by values not equal to this parameter." | |
}, | |
"$in": { | |
"type": "array", | |
"description": "Filter by values in this array.", | |
"items": { | |
"type": "string", | |
"title": "$in", | |
"description": "Filter by values in this array." | |
} | |
}, | |
"$nin": { | |
"type": "array", | |
"description": "Filter by values not in this array.", | |
"items": { | |
"type": "string", | |
"title": "$nin", | |
"description": "Filter by values not in this array." | |
} | |
}, | |
"$not": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "object", | |
"description": "Filter by values not matching the conditions in this parameter." | |
}, | |
{ | |
"type": "array", | |
"description": "Filter by values not matching the conditions in this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$not", | |
"description": "Filter by values not matching the conditions in this parameter." | |
} | |
} | |
] | |
}, | |
"$gt": { | |
"type": "string", | |
"title": "$gt", | |
"description": "Filter by values greater than this parameter. Useful for numbers and dates only." | |
}, | |
"$gte": { | |
"type": "string", | |
"title": "$gte", | |
"description": "Filter by values greater than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$lt": { | |
"type": "string", | |
"title": "$lt", | |
"description": "Filter by values less than this parameter. Useful for numbers and dates only." | |
}, | |
"$lte": { | |
"type": "string", | |
"title": "$lte", | |
"description": "Filter by values less than or equal to this parameter. Useful for numbers and dates only." | |
}, | |
"$like": { | |
"type": "string", | |
"title": "$like", | |
"description": "Apply a `like` filter. Useful for strings only." | |
}, | |
"$re": { | |
"type": "string", | |
"title": "$re", | |
"description": "Apply a regex filter. Useful for strings only." | |
}, | |
"$ilike": { | |
"type": "string", | |
"title": "$ilike", | |
"description": "Apply a case-insensitive `like` filter. Useful for strings only." | |
}, | |
"$fulltext": { | |
"type": "string", | |
"title": "$fulltext", | |
"description": "Filter to apply on full-text properties." | |
}, | |
"$overlap": { | |
"type": "array", | |
"description": "Filter arrays that have overlapping values with this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$overlap", | |
"description": "Filter arrays that have overlapping values with this parameter." | |
} | |
}, | |
"$contains": { | |
"type": "array", | |
"description": "Filter arrays that contain some of the values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contains", | |
"description": "Filter arrays that contain some of the values of this parameter." | |
} | |
}, | |
"$contained": { | |
"type": "array", | |
"description": "Filter arrays that contain all values of this parameter.", | |
"items": { | |
"type": "string", | |
"title": "$contained", | |
"description": "Filter arrays that contain all values of this parameter." | |
} | |
}, | |
"$exists": { | |
"type": "boolean", | |
"title": "$exists", | |
"description": "Filter by whether a value for this parameter exists (not `null`)." | |
} | |
} | |
} | |
} | |
}, | |
"Error": { | |
"title": "Response Error", | |
"type": "object", | |
"properties": { | |
"code": { | |
"type": "string", | |
"description": "A slug code to indicate the type of the error.", | |
"enum": [ | |
"invalid_state_error", | |
"invalid_request_error", | |
"api_error", | |
"unknown_error" | |
] | |
}, | |
"message": { | |
"type": "string", | |
"description": "Description of the error that occurred.", | |
"example": "first_name must be a string" | |
}, | |
"type": { | |
"type": "string", | |
"description": "A slug indicating the type of the error.", | |
"enum": [ | |
"QueryRunnerAlreadyReleasedError", | |
"TransactionAlreadyStartedError", | |
"TransactionNotStartedError", | |
"conflict", | |
"unauthorized", | |
"payment_authorization_error", | |
"duplicate_error", | |
"not_allowed", | |
"invalid_data", | |
"not_found", | |
"database_error", | |
"unexpected_state", | |
"invalid_argument", | |
"unknown_error" | |
] | |
} | |
} | |
}, | |
"InventoryLevel": { | |
"type": "object", | |
"description": "The inventory level's details", | |
"x-schemaName": "InventoryLevel", | |
"required": [ | |
"id", | |
"inventory_item_id", | |
"location_id", | |
"stocked_quantity", | |
"reserved_quantity", | |
"available_quantity", | |
"incoming_quantity" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"title": "id", | |
"description": "The inventory level's ID." | |
}, | |
"inventory_item_id": { | |
"type": "string", | |
"title": "inventory_item_id", | |
"description": "The ID of the associated inventory item." | |
}, | |
"location_id": { | |
"type": "string", | |
"title": "location_id", | |
"description": "The ID of the associated location." | |
}, | |
"stocked_quantity": { | |
"type": "number", | |
"title": "stocked_quantity", | |
"description": "The inventory level's stocked quantity." | |
}, | |
"reserved_quantity": { | |
"type": "number", | |
"title": "reserved_quantity", | |
"description": "The inventory level's reserved quantity." | |
}, | |
"available_quantity": { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment