Files
medusa-store/www/apps/api-reference/specs/admin/openapi.full.yaml
github-actions[bot] edc19e748b chore(docs): Updated API Reference (v2) (#8954)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2024-09-03 07:18:42 +00:00

66424 lines
2.5 MiB

openapi: 3.0.0
info:
version: 2.0.0
title: Medusa Admin API
license:
name: MIT
url: https://github.com/medusajs/medusa/blob/develop/LICENSE
servers:
- url: http://localhost:9000
- url: https://api.medusajs.com
tags:
- name: Auth
description: |
Auth API routes allow you to manage an admin user's authentication.
- name: Api Keys
description: |
API keys can be used for authentication or resource-scoping.
A secret API key can be used to authenticate admin users. A publishable API key can be used to scope client requests to one or more sales channels.
These API routes allow admin users to manage both publishable and secret API keys.
externalDocs:
description: Learn more about the API Key Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/api-key
x-associatedSchema:
$ref: '#/components/schemas/AdminApiKey'
- name: Campaigns
description: |
A campaign is a group of promotions that have the same conditions, such as start and end dates.
These API routes allow admin users to manage campaigns, their conditions, and promotions that belong to them.
externalDocs:
description: Learn more about campaigns.
url: https://docs.medusajs.com/v2/resources/commerce-modules/promotion/campaign
x-associatedSchema:
$ref: '#/components/schemas/AdminCampaign'
- name: Claims
description: |
An admin creates a claim for an order when a customer reports that an item is defective or incorrect.
Using these API routes, admin users manage order claims, their items, and more.
x-associatedSchema:
$ref: '#/components/schemas/AdminClaim'
externalDocs:
description: Learn more about order claims.
url: https://docs.medusajs.com/v2/resources/commerce-modules/order/claim
- name: Collections
description: |
A product collection organizes products into a collection for marketing purposes. For example, a summer collection.
These API routes allow admin users to manage collections and the products in them.
x-associatedSchema:
$ref: '#/components/schemas/AdminCollection'
- name: Currencies
description: |
A store can use unlimited currencies, and each region must be associated with at least one currency.
Currencies are defined by the Currency Module. Currency API Routes allow admins to list and update currencies.
externalDocs:
description: Learn more about the Currency Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/currency
x-associatedSchema:
$ref: '#/components/schemas/AdminCurrency'
- name: Customer Groups
description: |
Customers can be organized into groups. These groups are useful for segregation and marketing purposes.
For example, you can provide different prices for specific customers by creating a price list conditioned to their group.
These API routes allow admin users to manage groups and the customers in them.
externalDocs:
description: Learn more about the Customer Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/customer
x-associatedSchema:
$ref: '#/components/schemas/AdminCustomerGroup'
- name: Customers
description: |
Customers can either be created when they register through the Store APIs, or created by the admin using the Admin APIs.
These API routes allow admin users to manage customers in their store.
externalDocs:
description: Learn more about the Customer Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/customer
x-associatedSchema:
$ref: '#/components/schemas/AdminCustomer'
- name: Draft Orders
description: |
A draft order is an order created by the admin user. This is useful for orders created offline or from clients other than a storefront, such as a third-party integration.
These API routes allow admin users to create and manage draft orders.
externalDocs:
description: Learn more about the Order Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/order
- name: Exchanges
description: |
An exchange is the replacement of an item that the customer ordered with another.
These API routes allow admin users t create and manage exchanges.
externalDocs:
description: Learn more about the order exchanges.
url: https://docs.medusajs.com/v2/resources/commerce-modules/order/exchange
x-associatedSchema:
$ref: '#/components/schemas/AdminExchange'
- name: Fulfillment Providers
description: |
A fulfillment provider is a third-party integration or custom logic used to fulfill an order's items.
Fulfillment providers are installed as module providers.
externalDocs:
description: Learn more about the fulfillment providers and how to create them.
url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/fulfillment-provider
x-associatedSchema:
$ref: '#/components/schemas/AdminFulfillmentProvider'
- name: Fulfillment Sets
description: |
A fulfillment set is a general form or way of fulfillment, such as "shipping" or "pick up".
All fulfillment-related configurations in a store are related to a fulfillment set.
These API routes allow admin users to manage fulfillment sets.
externalDocs:
description: Learn more about fulfillment sets.
url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/concepts
x-associatedSchema:
$ref: '#/components/schemas/AdminFulfillmentSet'
- name: Fulfillments
description: |
A fulfillment is created for items in an order, return, exchanges, or claims to deliver items to/from the customer.
These API routes allow admin users to manage fulfillments.
externalDocs:
description: Learn more about fulfillments.
url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/item-fulfillment
x-associatedSchema:
$ref: '#/components/schemas/AdminFulfillment'
- name: Inventory Items
description: |
An inventory item is a stock-kept product whose inventory is managed.
These API routes allow admin users to manage inventory items.
externalDocs:
description: Learn more about inventory items.
url: https://docs.medusajs.com/v2/resources/commerce-modules/inventory/concepts
x-associatedSchema:
$ref: '#/components/schemas/AdminInventoryItem'
- name: Invites
description: |
An admin can invite new users to manage their team. This allows new users to authenticate as admins and perform admin functionalities.
These API routes allow admin users to manage invites.
externalDocs:
description: Learn more about the User Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/user
x-associatedSchema:
$ref: '#/components/schemas/AdminInvite'
- name: Notifications
description: |
A notification informs an admin user of store changes or status changes of background tasks.
These API routes allow admin users to view and manage notifications.
x-associatedSchema:
$ref: '#/components/schemas/AdminNotification'
- name: Order Edits
description: |
An order edit is a change to an order's details, such as items, shipping methods, and more.
Changes made by an order edit are only applied on the order once they're confirmed.
The order's previous version is retained due to versioning.
These API routes allow admin users to make edits to an order and manage those edits.
externalDocs:
description: Learn more about the Order Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/order
- name: Orders
description: |
An order is a purchase made by a customer through a storefront.
Orders can also originally be created as draft orders.
These API routes allow admin users to view and manage orders.
externalDocs:
description: Learn more about the orders
url: https://docs.medusajs.com/v2/resources/commerce-modules/order/concepts
x-associatedSchema:
$ref: '#/components/schemas/AdminOrder'
- name: Payment Collections
description: |
A payment collection is one or more payments of an order. They're also used for outstanding payments due to order exchanges or claims.
Every purchase or request for payment starts with a payment collection.
A payment collection holds the payment sessions used to authorize the payment amount, and the payments to be captured / refunded.
These API routes allow admin users to manage payment collections.
externalDocs:
description: Learn more about payment collections.
url: https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment-collection
x-associatedSchema:
$ref: '#/components/schemas/AdminPaymentCollection'
- name: Payments
description: |
A payment is created when a payment amount is authorized. The payment can then be captured or refunded.
A payment is created from the payment session that was authorized, and it belongs to the payment session's collection.
These API routes allow admin users to manage payments.
externalDocs:
description: Learn more about payments.
url: https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment
x-associatedSchema:
$ref: '#/components/schemas/AdminPayment'
- name: Price Lists
description: |
A price list is a group of prices applied if the specified conditions and rules are satisfied.
Price lists are useful for sales or special prices for special conditions, such as applying prices for a set of customers.
These API routes allow admin users to manage price lists.
externalDocs:
description: Learn more about price lists.
url: https://docs.medusajs.com/v2/resources/commerce-modules/pricing/concepts#price-list
x-associatedSchema:
$ref: '#/components/schemas/AdminPriceList'
- name: Price Preferences
description: |
A price preference is used to specify whether tax-inclusiveness is enabled for a context, such as a region or currency code.
These API routes allow admin users to manage whether a region or currency is tax inclusive.
externalDocs:
description: Learn more about tax-inclusiveness and the role of a price preference.
url: https://docs.medusajs.com/v2/resources/commerce-modules/pricing/tax-inclusive-pricing
x-associatedSchema:
$ref: '#/components/schemas/AdminPricePreference'
- name: Product Categories
description: |
Products can be categorized into categories.
Categories are nested and their heirarchy can be managed, giving admin users flexibility in how they categorize their products.
These API routes allow admin users to manage categories and the products in them.
externalDocs:
description: Learn more about the Product Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/product
x-associatedSchema:
$ref: '#/components/schemas/AdminProductCategory'
- name: Product Tags
description: |
A tag is another way of organizing a product. Each tag has a name and a value.
Products are organized into the same tag if they have the same value.
These API routes allow admin users to manage product tags.
externalDocs:
description: Learn more about the Product Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/product
x-associatedSchema:
$ref: '#/components/schemas/AdminProductTag'
- name: Product Types
description: |
Products can be organized into types. Each type has a name and a value.
Products are organized into the same type if they have the same value.
These API routes allow admin users to manage product types.
externalDocs:
description: Learn more about the Product Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/product
x-associatedSchema:
$ref: '#/components/schemas/AdminProductType'
- name: Product Variants
description: |
A product variant is a saleable form of the product.
Each variant has different option values. For example, a "Shirt" product may have a "Blue" variant and a "Green" variant. Customers choose from these variants when they buy the product.
These API routes allow admin users to manage product variants.
externalDocs:
description: Learn more about the Product Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/product
x-associatedSchema:
$ref: '#/components/schemas/AdminProductVariant'
- name: Products
description: |
A product is a set of variants that the customer chooses from when making a purchase.
A product can be organized into categories or collections.
A product can have many options, and variants for each of these options' values.
These API routes allow admin users to manage products.
externalDocs:
description: Learn more about the Product Module
url: https://docs.medusajs.com/v2/resources/commerce-modules/product
x-associatedSchema:
$ref: '#/components/schemas/AdminProduct'
- name: Promotions
description: |
A promotion discounts an amount or percentage off a cart's items, shipping methods, or the entire order.
Promotions have different types, such as a `standard` promotion that just discounts an amount, or a `buyget` promotion to enforce a "buy X get Y" promotion.
A promotion has rules to restrict how and when they're applied.
Promotions belong to a campaign, which sets conditions on the promotion such as when it starts and ends.
These API routes allow admin users to manage promotions.
externalDocs:
description: Learn more about promotions.
url: https://docs.medusajs.com/v2/resources/commerce-modules/promotion/concepts
x-associatedSchema:
$ref: '#/components/schemas/AdminPromotion'
- name: Refund Reasons
description: |
A refund reason is a possible reason used when issuing a refund to the customer, such as when returning an item and refunding the customer.
These API routes allow admin users to manage refund reasons.
x-associatedSchema:
$ref: '#/components/schemas/AdminRefundReason'
- name: Regions
description: |
Regions are different countries or geographical regions that the commerce store serves customers in.
These API routes allow admin users to manage regions, their providers, and more.
externalDocs:
description: Learn more about the Region Module.
url: https://docs.medusajs.com/v2/resources/commerce-modules/region
x-associatedSchema:
$ref: '#/components/schemas/AdminRegion'
- name: Reservations
description: |
A reservation is unavailable quantity of an inventory item in a location.
A reservation is created automatically for variants in an order whose `manage_inventory` is enabled. Admin users can also create reservations manually.
These API routes allow admin users to manage reservations.
externalDocs:
description: Learn more about reservations and other inventory concepts.
url: https://docs.medusajs.com/v2/resources/commerce-modules/inventory/concepts
x-associatedSchema:
$ref: '#/components/schemas/AdminReservation'
- name: Return Reasons
description: |
A return reason is a possible reason that an item is returned from the customer, such as when returning an item.
These API routes allow admin users to manage return reasons.
x-associatedSchema:
$ref: '#/components/schemas/AdminReturnReason'
- name: Returns
description: |
Admin users create a return when a customer returns an item to them.
Returns can also be created by customers through the storefront, and admins will be able to manage them and make refunds, if necessary. Refunds are made through the [Payment API Routes](#payment)
These API routes allow admin users to manage returns.
externalDocs:
description: Learn more about order returns.
url: https://docs.medusajs.com/v2/resources/commerce-modules/order/return
x-associatedSchema:
$ref: '#/components/schemas/AdminReturn'
- name: Sales Channels
description: |
A sales channel indicates a channel where products can be sold in. For example, a webshop or a mobile app.
These API routes allow admins to manage sales channels and the products available in them.
externalDocs:
description: Learn more about the Sales Channel Module.
url: https://docs.medusajs.com/v2/resources/commerce-modules/sales-channel
x-associatedSchema:
$ref: '#/components/schemas/AdminSalesChannel'
- name: Shipping Options
description: |
A shipping option is a way of shipping an item to or from the customer.
Shipping options are associated with the fulfillment provider used to handle their fulfillment.
Shipping options can be restricted geographically by service zones, and by custom rules, such as an item's weight or the customer's group.
These API routes allow admins to manage shipping options.
externalDocs:
description: Learn more about shipping options.
url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option
x-associatedSchema:
$ref: '#/components/schemas/AdminShippingOption'
- name: Shipping Profiles
description: |
A shipping profile defines a type of items that are shipping in a similar manner. For example, digital products may have a `digital` shipping profile.
These API routes allow admin users to manage shipping profiles.
externalDocs:
description: Learn more about shipping profiles and other fulfillment concepts.
url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/concepts#shipping-profile
x-associatedSchema:
$ref: '#/components/schemas/AdminShippingProfile'
- name: Stock Locations
description: |
A stock location is where stock-kept items (products) are kept.
Stock locations are linked to fulfillment providers used to fulfill items from this location.
A stock location is also link to a fulfillment set, indicating where an item is fulfilled from when an order is placed.
These API routes allow admin users to manage stock locations and their linked data.
externalDocs:
description: Learn more about stock locations.
url: https://docs.medusajs.com/v2/resources/commerce-modules/stock-location/concepts
x-associatedSchema:
$ref: '#/components/schemas/AdminStockLocation'
- name: Stores
description: |
A store holds the main configuration and information of your commerce store, such as supported currencies or default sales channel.
By default, the Medusa application has one default store. There are no API routes to create more stores. Instead, you'd have to handle that customization manually.
These API routes allow admin users to manage their store.
externalDocs:
description: Learn more about the Store Module.
url: https://docs.medusajs.com/v2/resources/commerce-modules/store
x-associatedSchema:
$ref: '#/components/schemas/AdminStore'
- name: Tax Rates
description: |
A tax rate is a percentage amount used to calculate the tax amount of each taxable item's price, such as line items or shipping methods.
Each tax region has a default tax rate. You can create tax rates that override the default using tax rules.
These API routes allow admin users to manage tax rates and their rules.
externalDocs:
description: Learn more about tax rates and rules.
url: https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules
x-associatedSchema:
$ref: '#/components/schemas/AdminTaxRate'
- name: Tax Regions
description: |
A tax region is a region's tax settings. It has tax rates and rules. So, after you create a region, you must create a tax region for it.
A tax region can extend settings from a parent tax region.
These API routes allow admin users to manage tax regions.
externalDocs:
description: Learn more about tax regions.
url: https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-region
x-associatedSchema:
$ref: '#/components/schemas/AdminTaxRegion'
- name: Uploads
description: |
Use these API routes to upload files to your Medusa application using the installed file module provider.
You can upload public files, such as product images, or private files, such as CSV files used to import products.
externalDocs:
description: Check out available file module providers.
url: https://docs.medusajs.com/v2/resources/architectural-modules/file
- name: Users
description: |
A user is an admin user that can authenticate and perform functionalities as an admin user.
An admin user can invite other users to join their team. Once they accept the invite, they'll become admin users as well.
These API routes allow admin users to manage their team.
externalDocs:
description: Learn more about the User Module.
url: https://docs.medusajs.com/v2/resources/commerce-modules/user
x-associatedSchema:
$ref: '#/components/schemas/AdminUser'
- name: Workflows Executions
description: |
These API routes allow you to track workflow executions in your Medusa application.
Depending on the workflow engine you use, executions may only be retained for a short while, or only until the Medusa application is restarted.
externalDocs:
description: Check out available Workflow Engine Modules
url: https://docs.medusajs.com/v2/resources/architectural-modules/workflow-engine
paths:
/admin/api-keys:
get:
operationId: GetApiKeys
summary: List API Keys
description: Retrieve a list of API keys. The API keys can be filtered by fields such as `id`. The API keys can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: A search term to search the API keys' searchable properties.
required: false
schema:
type: string
title: q
description: The search term.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by an API key's ID.
- type: array
description: Filter by API key IDs.
items:
type: string
title: id
description: The API key ID.
- name: title
in: query
required: false
schema:
oneOf:
- type: string
title: title
description: Filter by an API key's title.
- type: array
description: Filter by API key titles.
items:
type: string
title: title
description: The API key title.
- name: token
in: query
required: false
schema:
oneOf:
- type: string
title: token
description: Filter by an API key's token.
- type: array
description: Filter by API key tokens.
items:
type: string
title: token
description: The API key token.
- name: type
in: query
description: Filter by the API key's type.
required: false
schema:
type: string
enum:
- secret
- publishable
- name: created_at
in: query
description: Filter by the API key's creation date.
required: false
schema:
type: object
description: Filter by the API key'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 API key's update date.
required: false
schema:
type: object
description: Filter by the API key'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: deleted_at
in: query
description: Filter by the API key's deletion date.
required: false
schema:
type: object
description: Filter by the API key'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 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: revoked_at
in: query
description: Filter by the API key's revoke date.
required: false
schema:
type: object
description: Filter by the API key's revoke 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
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/api-keys' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Api Keys
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The maximum number of items returned in the list.
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.
- type: object
required:
- api_keys
properties:
api_keys:
type: array
description: The list of API keys.
items:
$ref: '#/components/schemas/ApiKeyResponse'
'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: PostApiKeys
summary: Create Api Key
description: Create a api key.
x-authenticated: true
parameters: []
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateApiKey'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/api-keys' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "{value}",
"type": "{value}"
}'
tags:
- Api Keys
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminApiKeyResponse'
'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: createApiKeysWorkflow
/admin/api-keys/{id}:
get:
operationId: GetApiKeysId
summary: Get API Key
description: Retrieve an API key by its ID. You can expand the API key's relations or select the fields that should be returned using the query parameters.
x-authenticated: true
parameters:
- name: id
in: path
description: The API key's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/api-keys/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Api Keys
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminApiKeyResponse'
'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: PostApiKeysId
summary: Update a Api Key
description: Update a api key's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The api key's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateApiKey'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/api-keys/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "{value}"
}'
tags:
- Api Keys
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminApiKeyResponse'
'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: updateApiKeysWorkflow
delete:
operationId: DeleteApiKeysId
summary: Delete an Api Key
description: |
Delete a publishable or secret API key.
x-authenticated: true
parameters:
- name: id
in: path
description: The API key's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/api-keys/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Api Keys
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The API key's ID.
object:
type: string
title: object
description: The name of the object that was deleted.
default: api_key
deleted:
type: boolean
title: deleted
description: Whether the API key was deleted.
'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: deleteApiKeysWorkflow
/admin/api-keys/{id}/revoke:
post:
operationId: PostApiKeysIdRevoke
summary: Add Revokes to Api Key
description: Add a list of revokes to a api key.
x-authenticated: true
parameters:
- name: id
in: path
description: The api key's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminRevokeApiKey'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/api-keys/{id}/revoke' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Api Keys
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminApiKeyResponse'
'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: revokeApiKeysWorkflow
/admin/api-keys/{id}/sales-channels:
post:
operationId: PostApiKeysIdSalesChannels
summary: Add Sales Channels to Api Key
description: Add a list of sales channels to a api key.
x-authenticated: true
parameters:
- name: id
in: path
description: The api key's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The api key's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The api key's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/api-keys/{id}/sales-channels' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Api Keys
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminApiKeyResponse'
'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: linkSalesChannelsToApiKeyWorkflow
/admin/campaigns:
get:
operationId: GetCampaigns
summary: List Campaigns
description: Retrieve a list of campaigns. The campaigns can be filtered by fields such as `id`. The campaigns can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/campaigns' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Campaigns
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of campaigns.
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The maximum number of items retrieved.
offset:
type: number
title: offset
description: The number of its skipped before the returned items.
count:
type: number
title: count
description: The total number of items.
- type: object
description: The list of campaigns
required:
- campaigns
properties:
campaigns:
type: array
description: The list of campaigns.
items:
$ref: '#/components/schemas/CampaignResponse'
'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: PostCampaigns
summary: Create Campaign
description: Create a campaign.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- name
- campaign_identifier
- description
- budget
- starts_at
- ends_at
properties:
name:
type: string
title: name
description: The campaign's name.
campaign_identifier:
type: string
title: campaign_identifier
description: The campaign's campaign identifier.
description:
type: string
title: description
description: The campaign's description.
budget:
type: object
description: The campaign's budget.
required:
- type
- limit
- currency_code
properties:
type:
type: string
enum:
- spend
- usage
limit:
type: number
title: limit
description: The budget's limit.
currency_code:
type: string
title: currency_code
description: The budget's currency code.
starts_at:
type: string
title: starts_at
description: The campaign's starts at.
format: date-time
ends_at:
type: string
title: ends_at
description: The campaign's ends at.
format: date-time
promotions:
type: array
description: The campaign's promotions.
items:
type: object
description: The promotion's promotions.
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/campaigns' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Gunner",
"campaign_identifier": "{value}",
"description": "{value}",
"starts_at": "2024-08-24T00:19:14.144Z",
"ends_at": "2024-10-01T06:47:50.133Z"
}'
tags:
- Campaigns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCampaignResponse'
'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: createCampaignsWorkflow
/admin/campaigns/{id}:
get:
operationId: GetCampaignsId
summary: Get a Campaign
description: Retrieve a campaign by its ID. You can expand the campaign's relations or select the fields that should be returned using the query parameters.
x-authenticated: true
parameters:
- name: id
in: path
description: The campaign's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/campaigns/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Campaigns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCampaignResponse'
'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: PostCampaignsId
summary: Update a Campaign
description: Update a campaign's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The campaign's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- description
- starts_at
- ends_at
properties:
name:
type: string
title: name
description: The campaign's name.
campaign_identifier:
type: string
title: campaign_identifier
description: The campaign's campaign identifier.
description:
type: string
title: description
description: The campaign's description.
budget:
type: object
description: The campaign's budget.
required:
- limit
properties:
limit:
type: number
title: limit
description: The budget's limit.
starts_at:
type: string
title: starts_at
description: The campaign's starts at.
format: date-time
ends_at:
type: string
title: ends_at
description: The campaign's ends at.
format: date-time
promotions:
type: array
description: The campaign's promotions.
items:
type: object
description: The promotion's promotions.
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/campaigns/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"description": "{value}",
"starts_at": "2024-08-10T14:44:10.530Z",
"ends_at": "2024-07-13T17:45:37.462Z"
}'
tags:
- Campaigns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCampaignResponse'
'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: updateCampaignsWorkflow
delete:
operationId: DeleteCampaignsId
summary: Delete a Campaign
description: |
Delete a campaign by its ID. This doesn't delete promotions that belong to this campaign.
x-authenticated: true
parameters:
- name: id
in: path
description: The campaign's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/campaigns/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Campaigns
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The campaign's ID.
object:
type: string
title: object
description: The name of the object that was deleted.
default: campaign
deleted:
type: boolean
title: deleted
description: Whether the campaign was deleted.
'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: deleteCampaignsWorkflow
/admin/campaigns/{id}/promotions:
post:
operationId: PostCampaignsIdPromotions
summary: Add Promotions to Campaign
description: Add a list of promotions to a campaign.
x-authenticated: true
parameters:
- name: id
in: path
description: The campaign's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The campaign's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The campaign's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/campaigns/{id}/promotions' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Campaigns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCampaignResponse'
'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: addOrRemoveCampaignPromotionsWorkflow
/admin/claims:
get:
operationId: GetClaims
summary: List Claims
description: Retrieve a list of claims. The claims can be filtered by fields such as `id`. The claims can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: deleted_at
in: query
description: The claim's deleted at.
required: false
schema:
type: object
description: The claim's deleted at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: q
in: query
description: The claim's q.
required: false
schema:
type: string
title: q
description: The claim's q.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: The claim's ID.
- type: array
description: The claim's ID.
items:
type: string
title: id
description: The id's ID.
- name: order_id
in: query
required: false
schema:
oneOf:
- type: string
title: order_id
description: The claim's order id.
- type: array
description: The claim's order id.
items:
type: string
title: order_id
description: The order id's details.
- name: status
in: query
required: false
schema:
oneOf:
- type: string
title: status
description: The claim's status.
- type: array
description: The claim's status.
items:
type: string
title: status
description: The status's details.
- name: created_at
in: query
description: The claim's created at.
required: false
schema:
type: object
description: The claim's created at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: The claim's updated at.
required: false
schema:
type: object
description: The claim's updated at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/claims' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimListResponse'
'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: PostClaims
summary: Create Claim
description: Create a claim.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostOrderClaimsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"type": "{value}",
"order_id": "{value}",
"metadata": {}
}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimOrderResponse'
'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: beginClaimOrderWorkflow
/admin/claims/{id}:
get:
operationId: GetClaimsId
summary: Get a Claim
description: Retrieve a claim by its ID. You can expand the claim's relations or select the fields that should be returned using the query parameters.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/claims/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimResponse'
'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'
/admin/claims/{id}/cancel:
post:
operationId: PostClaimsIdCancel
summary: Add Cancels to Claim
description: Add a list of cancels to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostCancelClaimReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/cancel' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimResponse'
'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: cancelOrderClaimWorkflow
/admin/claims/{id}/claim-items:
post:
operationId: PostClaimsIdClaimItems
summary: Add Claim Items to Claim
description: Add a list of claim items to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostClaimItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/claim-items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: orderClaimItemWorkflow
/admin/claims/{id}/claim-items/{action_id}:
post:
operationId: PostClaimsIdClaimItemsAction_id
summary: Add Claim Items to Claim
description: Add a list of claim items to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The claim's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostClaimsItemsActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/claim-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: updateClaimItemWorkflow
delete:
operationId: DeleteClaimsIdClaimItemsAction_id
summary: Remove a Claim Item from a Claim
x-sidebar-summary: Remove Claim Item
description: |
Remove an order item from a claim by the ID of the item's `WRITE_OFF_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the order item's `WRITE_OFF_ITEM` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/claims/{id}/claim-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: removeItemClaimActionWorkflow
/admin/claims/{id}/inbound/items:
post:
operationId: PostClaimsIdInboundItems
summary: Add Items to Claim
description: Add a list of items to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsRequestItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/inbound/items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimReturnPreviewResponse'
'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: orderClaimRequestItemReturnWorkflow
/admin/claims/{id}/inbound/items/{action_id}:
post:
operationId: PostClaimsIdInboundItemsAction_id
summary: Add Items to Claim
description: Add a list of items to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The claim's action id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsRequestItemsActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/inbound/items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimReturnPreviewResponse'
'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: updateRequestItemReturnWorkflow
delete:
operationId: DeleteClaimsIdInboundItemsAction_id
summary: Remove an Inbound Item from Claim
x-sidebar-summary: Remove Inbound Item
description: |
Remove an inbound (or return) item from a claim using the `ID` of the item's `RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the return item's `RETURN_ITEM` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/claims/{id}/inbound/items/{action_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimReturnPreviewResponse'
'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: removeItemReturnActionWorkflow
/admin/claims/{id}/inbound/shipping-method:
post:
operationId: PostClaimsIdInboundShippingMethod
summary: Add Shipping Methods to Claim
description: Add a list of shipping methods to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsShippingReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/inbound/shipping-method' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipping_option_id": "{value}"
}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimReturnPreviewResponse'
'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: createClaimShippingMethodWorkflow
/admin/claims/{id}/inbound/shipping-method/{action_id}:
post:
operationId: PostClaimsIdInboundShippingMethodAction_id
summary: Add Shipping Methods to Claim
description: Add a list of shipping methods to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The claim's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostClaimsShippingActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/inbound/shipping-method/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: updateReturnShippingMethodWorkflow
delete:
operationId: DeleteClaimsIdInboundShippingMethodAction_id
summary: Remove Inbound Shipping Method from Claim
x-sidebar-summary: Remove Inbound Shipping Method
description: |
Remove the shipping method for returning items in the claim using the `ID` of the method's `SHIPPING_ADD` action.
Every shipping method has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the shipping method's `SHIPPING_ADD` action.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/claims/{id}/inbound/shipping-method/{action_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimReturnPreviewResponse'
'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: removeClaimShippingMethodWorkflow
/admin/claims/{id}/outbound/items:
post:
operationId: PostClaimsIdOutboundItems
summary: Add Items to Claim
description: Add a list of items to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostClaimsAddItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/outbound/items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: orderClaimAddNewItemWorkflow
/admin/claims/{id}/outbound/items/{action_id}:
post:
operationId: PostClaimsIdOutboundItemsAction_id
summary: Add Items to Claim
description: Add a list of items to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The claim's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostClaimsItemsActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/outbound/items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: updateClaimAddItemWorkflow
delete:
operationId: DeleteClaimsIdOutboundItemsAction_id
summary: Remove an Outbound Item from Claim
x-sidebar-summary: Remove Outbound Item
description: |
Remove an outbound (or new) item from a claim using the `ID` of the item's `ITEM_ADD` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the new claim item's `ITEM_ADD` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/claims/{id}/outbound/items/{action_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: removeAddItemClaimActionWorkflow
/admin/claims/{id}/outbound/shipping-method:
post:
operationId: PostClaimsIdOutboundShippingMethod
summary: Add Shipping Methods to Claim
description: Add a list of shipping methods to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostClaimsShippingReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/outbound/shipping-method' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipping_option_id": "{value}"
}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: createClaimShippingMethodWorkflow
/admin/claims/{id}/outbound/shipping-method/{action_id}:
post:
operationId: PostClaimsIdOutboundShippingMethodAction_id
summary: Add Shipping Methods to Claim
description: Add a list of shipping methods to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The claim's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostClaimsShippingActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/outbound/shipping-method/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: updateClaimShippingMethodWorkflow
delete:
operationId: DeleteClaimsIdOutboundShippingMethodAction_id
summary: Remove Outbound Shipping Method from Claim
x-sidebar-summary: Remove Outbound Shipping Method
description: |
Remove the shipping method for delivering outbound items in the claim using the `ID` of the method's `SHIPPING_ADD` action.
Every shipping method has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the shipping method's `SHIPPING_ADD` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/claims/{id}/outbound/shipping-method/{action_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimPreviewResponse'
'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: removeClaimShippingMethodWorkflow
/admin/claims/{id}/request:
post:
operationId: PostClaimsIdRequest
summary: Add Requests to Claim
description: Add a list of requests to a claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/claims/{id}/request' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimRequestResponse'
'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'
requestBody:
content:
application/json:
schema: {}
x-workflow: confirmClaimRequestWorkflow
delete:
operationId: DeleteClaimsIdRequest
summary: Cancel Claim Request
description: Cancel a requested claim.
x-authenticated: true
parameters:
- name: id
in: path
description: The claim's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/claims/{id}/request' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Claims
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminClaimDeleteResponse'
'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: cancelBeginOrderClaimWorkflow
/admin/collections:
get:
operationId: GetCollections
summary: List Collections
description: Retrieve a list of collections. The collections can be filtered by fields such as `id`. The collections can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: deleted_at
in: query
description: Filter by the collection's deletion date.
required: false
schema:
type: object
description: Filter by the collection'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 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: q
in: query
description: Search term to filter the collection's searchable properties by.
required: false
schema:
type: string
title: q
description: Search term to filter the collection's searchable properties by.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a collection's ID.
- type: array
description: Filter by collection IDs.
items:
type: string
title: id
description: The collection's ID.
- 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: The collection's handle.
- 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: The collection's 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: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/collections' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCollectionListResponse'
'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: PostCollections
summary: Create Collection
description: Create a collection.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateCollection'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/collections' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "{value}",
"metadata": {}
}'
tags:
- Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCollectionResponse'
'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: createCollectionsWorkflow
/admin/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 using the query parameters.
x-authenticated: true
parameters:
- name: id
in: path
description: The collection's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/collections/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCollectionResponse'
'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: PostCollectionsId
summary: Update a Collection
description: Update a collection's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The collection's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateCollection'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/collections/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"metadata": {}
}'
tags:
- Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCollectionResponse'
'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: updateCollectionsWorkflow
delete:
operationId: DeleteCollectionsId
summary: Delete a Collection
description: Delete a product collection.
x-authenticated: true
parameters:
- name: id
in: path
description: The collection's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/collections/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCollectionDeleteResponse'
'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: deleteCollectionsWorkflow
/admin/collections/{id}/products:
post:
operationId: PostCollectionsIdProducts
summary: Add Products to Collection
description: Add a list of products to a collection.
x-authenticated: true
parameters:
- name: id
in: path
description: The collection's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The collection's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The collection's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/collections/{id}/products' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCollectionResponse'
'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: batchLinkProductsToCollectionWorkflow
/admin/currencies:
get:
operationId: GetCurrencies
summary: List Currencies
description: Retrieve a list of currencies. The currencies can be filtered by fields such as `id`. The currencies can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: The search term to filter the currency's searchable properties by.
required: false
schema:
type: string
title: q
description: The search term to filter the currency's searchable properties by.
- 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
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/currencies' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Currencies
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCurrencyListResponse'
'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'
/admin/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 using the query parameters.
x-authenticated: true
parameters:
- name: code
in: path
description: The currency's code.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/currencies/{code}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Currencies
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCurrencyResponse'
'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'
/admin/customer-groups:
get:
operationId: GetCustomerGroups
summary: List Customer Groups
description: Retrieve a list of customer groups. The customer groups can be filtered by fields such as `id`. The customer groups can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 customer group's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the customer group's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a customer group's IDs.
- type: array
description: Filter by customer group IDs.
items:
type: string
title: id
description: A customer group's ID.
- name: name
in: query
required: false
schema:
oneOf:
- type: string
title: name
description: Filter by a customer group's name.
- type: array
description: Filter by customer group names.
items:
type: string
title: name
description: A customer group's name.
- name: customers
in: query
required: false
schema:
oneOf:
- type: string
title: customers
description: Filter by the ID of a customer to retrieve its groups.
- type: array
description: Filter by customer IDs to retrieve their groups.
items:
type: string
title: customers
description: A customer's ID.
- $ref: '#/components/schemas/AdminCustomerInGroupFilters'
- name: created_by
in: query
required: false
schema:
oneOf:
- type: string
title: created_by
description: Filter by an ID of a user to retrieve the customer groups they created.
- type: array
description: Filter by the IDs of users to retrieve the customer groups they created.
items:
type: string
title: created_by
description: The user's ID.
- name: created_at
in: query
description: Filter the customer group by its creation date.
required: false
schema:
type: object
description: Filter the customer group by its 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 the customer groups by their update date.
required: false
schema:
type: object
description: Filter the customer groups by their 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: deleted_at
in: query
description: Filter the customer groups by their deletion date.
required: false
schema:
type: object
description: Filter the customer groups by their 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 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
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/customer-groups' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customer Groups
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The customer group's limit.
offset:
type: number
title: offset
description: The customer group's offset.
count:
type: number
title: count
description: The customer group's count.
- type: object
description: SUMMARY
required:
- customer_groups
properties:
customer_groups:
type: array
description: The customer group's customer groups.
items:
$ref: '#/components/schemas/AdminCustomerGroup'
'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: PostCustomerGroups
summary: Create Customer Group
description: Create a customer group.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateCustomerGroup'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/customer-groups' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Solon",
"metadata": {}
}'
tags:
- Customer Groups
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerGroupResponse'
'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: createCustomerGroupsWorkflow
/admin/customer-groups/{id}:
get:
operationId: GetCustomerGroupsId
summary: Get a Customer Group
description: Retrieve a customer group by its ID. You can expand the customer group's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer group's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/customer-groups/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customer Groups
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerGroupResponse'
'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: PostCustomerGroupsId
summary: Update a Customer Group
description: Update a customer group's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer group's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateCustomerGroup'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/customer-groups/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Corbin",
"metadata": {}
}'
tags:
- Customer Groups
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerGroupResponse'
'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: updateCustomerGroupsWorkflow
delete:
operationId: DeleteCustomerGroupsId
summary: Delete a Customer Group
description: |
Delete a customer group. Customers in the group aren't deleted.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer group's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/customer-groups/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customer Groups
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The customer group's ID.
object:
type: string
title: object
description: The customer group's object.
deleted:
type: boolean
title: deleted
description: The customer group's deleted.
'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: deleteCustomerGroupsWorkflow
/admin/customer-groups/{id}/customers:
post:
operationId: PostCustomerGroupsIdCustomers
summary: Add Customers to Customer Group
description: Add a list of customers to a customer group.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer group's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The customer group's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The customer group's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/customer-groups/{id}/customers' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customer Groups
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerGroupResponse'
'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: linkCustomersToCustomerGroupWorkflow
/admin/customers:
get:
operationId: GetCustomers
summary: List Customers
description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: groups
in: query
required: false
schema:
oneOf:
- type: string
title: groups
description: Filter by a customer group's ID to retrieve customers that belong to it.
- $ref: '#/components/schemas/CustomerGroupInCustomerFilters'
- type: array
description: Filter by customer group IDs to retrieve customers that belong to them.
items:
type: string
title: groups
description: The customer group's ID.
- name: q
in: query
description: Search term to filter the customer's searchable properties by.
required: false
schema:
type: string
title: q
description: Search term to filter the customer's searchable properties by.
- name: id
in: query
required: false
schema:
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.
- type: object
description: Filters to apply on the customer ID.
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.
- type: array
description: Filter by exact matches.
items:
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:
oneOf:
- type: string
title: $ne
description: Filter by values not equal to this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
oneOf:
- type: string
title: $in
description: Filter by matching value.
- type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter matching values.
$nin:
type: array
description: Filter by values not in this array.
items:
oneOf:
- type: string
title: $nin
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 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 this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
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 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 exact matches.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
$gt:
oneOf:
- type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than items in this array. Useful for numbers and dates only.
items:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
oneOf:
- type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
oneOf:
- type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than items in this array. Useful for numbers and dates only.
items:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
oneOf:
- type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: email
in: query
required: false
schema:
oneOf:
- type: string
title: email
description: Filter by a customer 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: Filter by conditions on the customer 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.
- type: array
description: Filter by exact matches.
items:
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:
oneOf:
- type: string
title: $ne
description: Filter by values not equal to this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
oneOf:
- type: string
title: $in
description: Filter by matching value.
- type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter matching values.
$nin:
type: array
description: Filter by values not in this array.
items:
oneOf:
- type: string
title: $nin
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 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 this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
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 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 exact matches.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
$gt:
oneOf:
- type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than items in this array. Useful for numbers and dates only.
items:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
oneOf:
- type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
oneOf:
- type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than items in this array. Useful for numbers and dates only.
items:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
oneOf:
- type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: company_name
in: query
required: false
schema:
oneOf:
- type: string
title: company_name
description: Filter by a customer's company name.
- type: array
description: Filter by customer company names.
items:
type: string
title: company_name
description: The customer's company name.
- type: object
description: Filter by conditions on the customer's company name.
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.
- type: array
description: Filter by exact matches.
items:
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:
oneOf:
- type: string
title: $ne
description: Filter by values not equal to this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
oneOf:
- type: string
title: $in
description: Filter by matching value.
- type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter matching values.
$nin:
type: array
description: Filter by values not in this array.
items:
oneOf:
- type: string
title: $nin
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 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 this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
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 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 exact matches.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
$gt:
oneOf:
- type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than items in this array. Useful for numbers and dates only.
items:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
oneOf:
- type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
oneOf:
- type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than items in this array. Useful for numbers and dates only.
items:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
oneOf:
- type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: first_name
in: query
required: false
schema:
oneOf:
- type: string
title: first_name
description: Filter by a customer's first name.
- type: array
description: Filter by customer first names.
items:
type: string
title: first_name
description: A customer's first name.
- type: object
description: Filter by conditions on the first name.
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.
- type: array
description: Filter by exact matches.
items:
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:
oneOf:
- type: string
title: $ne
description: Filter by values not equal to this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
oneOf:
- type: string
title: $in
description: Filter by matching value.
- type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter matching values.
$nin:
type: array
description: Filter by values not in this array.
items:
oneOf:
- type: string
title: $nin
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 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 this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
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 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 exact matches.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
$gt:
oneOf:
- type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than items in this array. Useful for numbers and dates only.
items:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
oneOf:
- type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
oneOf:
- type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than items in this array. Useful for numbers and dates only.
items:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
oneOf:
- type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: last_name
in: query
required: false
schema:
oneOf:
- type: string
title: last_name
description: Filter by a customer's last name.
- type: array
description: Filter by customer last names.
items:
type: string
title: last_name
description: A customer's last name.
- type: object
description: Filter by conditions on a customer's last name.
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.
- type: array
description: Filter by exact matches.
items:
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:
oneOf:
- type: string
title: $ne
description: Filter by values not equal to this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
oneOf:
- type: string
title: $in
description: Filter by matching value.
- type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter matching values.
$nin:
type: array
description: Filter by values not in this array.
items:
oneOf:
- type: string
title: $nin
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 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 this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
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 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 exact matches.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
$gt:
oneOf:
- type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than items in this array. Useful for numbers and dates only.
items:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
oneOf:
- type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
oneOf:
- type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than items in this array. Useful for numbers and dates only.
items:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
oneOf:
- type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: created_by
in: query
required: false
schema:
oneOf:
- type: string
title: created_by
description: Filter by a user ID to retrieve the customers they created.
- type: array
description: Filter by user IDs to retrieve customers they created.
items:
type: string
title: created_by
description: A user's ID.
- type: object
description: Filter by conditions on the user ID that created the customer.
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.
- type: array
description: Filter by exact matches.
items:
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:
oneOf:
- type: string
title: $ne
description: Filter by values not equal to this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
oneOf:
- type: string
title: $in
description: Filter by matching value.
- type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter matching values.
$nin:
type: array
description: Filter by values not in this array.
items:
oneOf:
- type: string
title: $nin
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 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 this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
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 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 exact matches.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
$gt:
oneOf:
- type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than items in this array. Useful for numbers and dates only.
items:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
oneOf:
- type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
oneOf:
- type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than items in this array. Useful for numbers and dates only.
items:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
oneOf:
- type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: created_at
in: query
description: Filter by the customer's creation date.
required: false
schema:
type: object
description: Filter by 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 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 a customer's update date.
required: false
schema:
type: object
description: Filter by a 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 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: deleted_at
in: query
description: Filter a customer by their deletion date.
required: false
schema:
type: object
description: Filter a customer by their 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 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
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: has_account
in: query
description: The customer's has account.
required: false
schema:
type: boolean
title: has_account
description: The customer's has account.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/customers' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of customers.
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The maximum number of items returned in the list.
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 customers.
required:
- customers
properties:
customers:
$ref: '#/components/schemas/AdminCustomer'
'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: PostCustomers
summary: Create Customer
description: Create a customer.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- email
- company_name
- first_name
- last_name
- phone
- metadata
properties:
email:
type: string
title: email
description: The customer's email.
format: email
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.
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/customers' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "Tomas.Toy16@yahoo.com",
"company_name": "{value}",
"first_name": "{value}",
"last_name": "{value}",
"phone": "{value}",
"metadata": {}
}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerResponse'
'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: createCustomersWorkflow
/admin/customers/{id}:
get:
operationId: GetCustomersId
summary: Get a Customer
description: Retrieve a customer by its ID. You can expand the customer's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/customers/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerResponse'
'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: PostCustomersId
summary: Update a Customer
description: Update a customer's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- email
- company_name
- first_name
- last_name
- phone
- metadata
properties:
email:
type: string
title: email
description: The customer's email.
format: email
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.
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/customers/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "Daren_Rodriguez-Rutherford93@gmail.com",
"company_name": "{value}",
"first_name": "{value}",
"last_name": "{value}",
"phone": "{value}",
"metadata": {}
}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerResponse'
'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
delete:
operationId: DeleteCustomersId
summary: Delete a Customer
description: Delete a customer.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/customers/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The customer's ID.
object:
type: string
title: object
description: The customer's object.
deleted:
type: boolean
title: deleted
description: The customer's deleted.
'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: deleteCustomersWorkflow
/admin/customers/{id}/addresses:
get:
operationId: GetCustomersIdAddresses
summary: List Addresses
description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like `query`. The addresses can also be paginated.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 apply on the address's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to apply on the address's searchable properties.
- name: company
in: query
required: false
schema:
oneOf:
- type: string
title: company
description: Filter by a company.
- type: array
description: Filter by companies.
items:
type: string
title: company
description: A company's name.
- name: city
in: query
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's name.
- name: country_code
in: query
required: false
schema:
oneOf:
- type: string
title: country_code
description: Filter by a currency code.
- type: array
description: Filter by currency codes.
items:
type: string
title: country_code
description: A currency code.
- name: province
in: query
required: false
schema:
oneOf:
- type: string
title: province
description: Filter by a province.
- type: array
description: Filter by provinces.
items:
type: string
title: province
description: A province code.
- name: postal_code
in: query
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: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/customers/{id}/addresses' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of customer addresses.
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 customer addresses
required:
- addresses
properties:
addresses:
type: array
description: The customer addresses.
items:
$ref: '#/components/schemas/AdminCustomerAddress'
'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: PostCustomersIdAddresses
summary: Add Addresses to Customer
description: Add a list of addresses to a customer.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- address_name
- company
- first_name
- last_name
- address_1
- address_2
- city
- country_code
- province
- postal_code
- phone
- metadata
properties:
address_name:
type: string
title: address_name
description: The customer's address name.
is_default_shipping:
type: boolean
title: is_default_shipping
description: The customer's is default shipping.
is_default_billing:
type: boolean
title: is_default_billing
description: The customer's is default billing.
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 customer's address 1.
address_2:
type: string
title: address_2
description: The customer's address 2.
city:
type: string
title: city
description: The customer's city.
country_code:
type: string
title: country_code
description: The customer's country code.
province:
type: string
title: province
description: The customer's province.
postal_code:
type: string
title: postal_code
description: The customer's postal code.
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/customers/{id}/addresses' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"address_name": "{value}",
"company": "{value}",
"first_name": "{value}",
"last_name": "{value}",
"address_1": "{value}",
"address_2": "{value}",
"city": "{value}",
"country_code": "{value}",
"province": "{value}",
"postal_code": "{value}",
"phone": "{value}",
"metadata": {}
}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerResponse'
'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
/admin/customers/{id}/addresses/{address_id}:
get:
operationId: GetCustomersIdAddressesAddress_id
summary: List Addresses
description: Retrieve a list of a customer's addresses. The addresses can be filtered by fields like `company`. The addresses can also be paginated.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer's ID.
required: true
schema:
type: string
- name: address_id
in: path
description: The customer's address id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/customers/{id}/addresses/{address_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerAddressResponse'
'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: PostCustomersIdAddressesAddress_id
summary: Add Addresses to Customer
description: Add a list of addresses to a customer.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer's ID.
required: true
schema:
type: string
- name: address_id
in: path
description: The customer's address id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- address_name
- company
- first_name
- last_name
- address_1
- address_2
- city
- country_code
- province
- postal_code
- phone
- metadata
properties:
address_name:
type: string
title: address_name
description: The customer's address name.
is_default_shipping:
type: boolean
title: is_default_shipping
description: The customer's is default shipping.
is_default_billing:
type: boolean
title: is_default_billing
description: The customer's is default billing.
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 customer's address 1.
address_2:
type: string
title: address_2
description: The customer's address 2.
city:
type: string
title: city
description: The customer's city.
country_code:
type: string
title: country_code
description: The customer's country code.
province:
type: string
title: province
description: The customer's province.
postal_code:
type: string
title: postal_code
description: The customer's postal code.
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/customers/{id}/addresses/{address_id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"address_name": "{value}",
"company": "{value}",
"first_name": "{value}",
"last_name": "{value}",
"address_1": "{value}",
"address_2": "{value}",
"city": "{value}",
"country_code": "{value}",
"province": "{value}",
"postal_code": "{value}",
"phone": "{value}",
"metadata": {}
}'
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCustomerResponse'
'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: DeleteCustomersIdAddressesAddress_id
summary: Remove an Address from Customer
description: Remove a customer's address.
x-authenticated: true
parameters:
- name: id
in: path
description: The customer's ID.
required: true
schema:
type: string
- name: address_id
in: path
description: The customer address's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/customers/{id}/addresses/{address_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Customers
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The customer's ID.
object:
type: string
title: object
description: The name of the deleted object.
deleted:
type: boolean
title: deleted
description: Whether the Customer was deleted.
- type: object
description: SUMMARY
properties:
parent:
$ref: '#/components/schemas/AdminCustomer'
description: SUMMARY
'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
/admin/draft-orders:
get:
operationId: GetDraftOrders
summary: List Draft Orders
description: Retrieve a list of draft orders. The draft orders can be filtered by fields such as `id`. The draft orders can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 a draft order's ID.
- type: array
description: Filter by draft order IDs.
items:
type: string
title: id
description: A draft order's ID.
- type: object
description: Filter by conditions on the draft order's ID.
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.
- type: array
description: Filter by exact matches.
items:
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:
oneOf:
- type: string
title: $ne
description: Filter by values not equal to this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
oneOf:
- type: string
title: $in
description: Filter by matching value.
- type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter matching values.
$nin:
type: array
description: Filter by values not in this array.
items:
oneOf:
- type: string
title: $nin
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 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 this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
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 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 exact matches.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
$gt:
oneOf:
- type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than items in this array. Useful for numbers and dates only.
items:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
oneOf:
- type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
oneOf:
- type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than items in this array. Useful for numbers and dates only.
items:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
oneOf:
- type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: status
in: query
required: false
schema:
oneOf:
- type: string
title: status
description: Filter by a draft order's status.
- type: array
description: Filter by draft order statuses.
items:
type: string
title: status
description: The draft order status.
- type: object
description: Filter by conditions on the status.
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.
- type: array
description: Filter by exact matches.
items:
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:
oneOf:
- type: string
title: $ne
description: Filter by values not equal to this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
oneOf:
- type: string
title: $in
description: Filter by matching value.
- type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter matching values.
$nin:
type: array
description: Filter by values not in this array.
items:
oneOf:
- type: string
title: $nin
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 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 this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
- type: array
description: Filter by values not in this array.
items:
type: string
title: $not
description: Filter by values not matching this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
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 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 exact matches.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not matching this parameter.
$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 in this array.
items:
type: string
title: $not
description: Filter by values not matching 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`).
$gt:
oneOf:
- type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than items in this array. Useful for numbers and dates only.
items:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
oneOf:
- type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values greater than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
oneOf:
- type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than items in this array. Useful for numbers and dates only.
items:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
oneOf:
- type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- type: array
description: Filter by values less than or equal to items in this array. Useful for numbers and dates only.
items:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: $and
in: query
description: 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: sales_channel_id
in: query
description: The draft order's sales channel id.
required: false
schema:
type: array
description: The draft order's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
- name: fulfillment_status
in: query
description: The draft order's fulfillment status.
required: false
schema:
type: array
description: The draft order's fulfillment status.
items:
type: string
description: The fulfillment status's details.
enum:
- canceled
- not_fulfilled
- partially_fulfilled
- fulfilled
- partially_shipped
- shipped
- partially_delivered
- delivered
- name: payment_status
in: query
description: The draft order's payment status.
required: false
schema:
type: array
description: The draft order's payment status.
items:
type: string
description: The payment status's details.
enum:
- canceled
- not_paid
- awaiting
- authorized
- partially_authorized
- captured
- partially_captured
- partially_refunded
- refunded
- requires_action
- name: region_id
in: query
description: The draft order's region id.
required: false
schema:
type: array
description: The draft order's region id.
items:
type: string
title: region_id
description: The region id's details.
- name: q
in: query
description: The draft order's q.
required: false
schema:
type: string
title: q
description: The draft order's q.
- name: created_at
in: query
description: The draft order's created at.
required: false
schema:
type: object
description: The draft order's created at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: The draft order's updated at.
required: false
schema:
type: object
description: The draft order's updated at.
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.
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`).
- 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`).
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/draft-orders' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Draft Orders
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The draft order's limit.
offset:
type: number
title: offset
description: The draft order's offset.
count:
type: number
title: count
description: The draft order's count.
- type: object
description: SUMMARY
required:
- draft_orders
properties:
draft_orders:
$ref: '#/components/schemas/AdminOrder'
'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: PostDraftOrders
summary: Create Draft Order
description: Create a draft order.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- sales_channel_id
- email
- customer_id
- region_id
- currency_code
- shipping_methods
- metadata
properties:
status:
type: boolean
title: status
description: The draft order's status.
sales_channel_id:
type: string
title: sales_channel_id
description: The draft order's sales channel id.
email:
type: string
title: email
description: The draft order's email.
format: email
customer_id:
type: string
title: customer_id
description: The draft order's customer id.
billing_address:
type: object
description: The draft order's billing address.
required:
- first_name
- last_name
- phone
- company
- address_1
- address_2
- city
- country_code
- province
- postal_code
- metadata
properties:
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
shipping_address:
type: object
description: The draft order's shipping address.
required:
- first_name
- last_name
- phone
- company
- address_1
- address_2
- city
- country_code
- province
- postal_code
- metadata
properties:
first_name:
type: string
title: first_name
description: The shipping address's first name.
last_name:
type: string
title: last_name
description: The shipping address's last name.
phone:
type: string
title: phone
description: The shipping address's phone.
company:
type: string
title: company
description: The shipping address's company.
address_1:
type: string
title: address_1
description: The shipping address's address 1.
address_2:
type: string
title: address_2
description: The shipping address's address 2.
city:
type: string
title: city
description: The shipping address's city.
country_code:
type: string
title: country_code
description: The shipping address's country code.
province:
type: string
title: province
description: The shipping address's province.
postal_code:
type: string
title: postal_code
description: The shipping address's postal code.
metadata:
type: object
description: The shipping address's metadata.
items:
type: array
description: The draft order's items.
items:
type: object
description: The item's items.
required:
- title
- sku
- barcode
- variant_id
- unit_price
- quantity
- metadata
properties:
title:
type: string
title: title
description: The item's title.
sku:
type: string
title: sku
description: The item's sku.
barcode:
type: string
title: barcode
description: The item's barcode.
variant_id:
type: string
title: variant_id
description: The item's variant id.
unit_price:
oneOf:
- type: string
title: unit_price
description: The item's unit price.
- type: number
title: unit_price
description: The item's unit price.
- type: object
description: The item's unit price.
required:
- value
- precision
properties:
value:
type: string
title: value
description: The unit price's value.
precision:
type: number
title: precision
description: The unit price's precision.
quantity:
type: number
title: quantity
description: The item's quantity.
metadata:
type: object
description: The item's metadata.
region_id:
type: string
title: region_id
description: The draft order's region id.
promo_codes:
type: array
description: The draft order's promo codes.
items:
type: string
title: promo_codes
description: The promo code's promo codes.
currency_code:
type: string
title: currency_code
description: The draft order's currency code.
no_notification_order:
type: boolean
title: no_notification_order
description: The draft order's no notification order.
shipping_methods:
type: array
description: The draft order's shipping methods.
items:
type: object
description: The shipping method's shipping methods.
required:
- shipping_method_id
- order_id
- name
- option_id
- amount
properties:
shipping_method_id:
type: string
title: shipping_method_id
description: The shipping method's shipping method id.
order_id:
type: string
title: order_id
description: The shipping method's order id.
name:
type: string
title: name
description: The shipping method's name.
option_id:
type: string
title: option_id
description: The shipping method's option id.
data:
type: object
description: The shipping method's data.
amount:
oneOf:
- type: string
title: amount
description: The shipping method's amount.
- type: number
title: amount
description: The shipping method's amount.
- type: object
description: The shipping method's amount.
required:
- value
- precision
properties:
value:
type: string
title: value
description: The amount's value.
precision:
type: number
title: precision
description: The amount's precision.
metadata:
type: object
description: The draft order's metadata.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/draft-orders' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"sales_channel_id": "{value}",
"email": "Bartholome.Goodwin90@yahoo.com",
"customer_id": "{value}",
"region_id": "{value}",
"currency_code": "{value}",
"shipping_methods": [
{
"shipping_method_id": "{value}",
"order_id": "{value}",
"name": "Cheyanne",
"option_id": "{value}"
}
],
"metadata": {}
}'
tags:
- Draft Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminDraftOrderResponse'
'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: createOrdersWorkflow
/admin/draft-orders/{id}:
get:
operationId: GetDraftOrdersId
summary: Get a Draft Order
description: Retrieve a draft order by its ID. You can expand the draft order's relations or select the fields that should be returned using the query parameters.
x-authenticated: true
parameters:
- name: id
in: path
description: The draft order's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/draft-orders/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Draft Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminDraftOrderResponse'
'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'
/admin/exchanges:
get:
operationId: GetExchanges
summary: List Exchanges
description: Retrieve a list of exchanges. The exchanges can be filtered by fields such as `id`. The exchanges can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: deleted_at
in: query
description: Filter by an exchange's deletion date.
required: false
schema:
type: object
description: Filter by an exchange'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 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: q
in: query
description: Search term to apply on an exchange's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to apply on an exchange's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by an exchange ID.
- type: array
description: Filter by exchange IDs.
items:
type: string
title: id
description: An exchange ID.
- name: order_id
in: query
required: false
schema:
oneOf:
- type: string
title: order_id
description: Filter by an exchange's order ID.
- type: array
description: Filter by order IDs that the exchanges belong to.
items:
type: string
title: order_id
description: An order's ID.
- name: status
in: query
required: false
schema:
oneOf:
- type: string
title: status
description: Filter by an exchange's status.
- type: array
description: Filter by exchange statuses.
items:
type: string
title: status
description: An exchange status.
- name: created_at
in: query
description: Filter by the exchange's creation date.
required: false
schema:
type: object
description: Filter by the exchange'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 exchange's update date.
required: false
schema:
type: object
description: Filter by the exchange'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
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/exchanges' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The exchange's limit.
offset:
type: number
title: offset
description: The exchange's offset.
count:
type: number
title: count
description: The exchange's count.
- type: object
description: SUMMARY
required:
- exchanges
properties:
exchanges:
$ref: '#/components/schemas/AdminExchange'
'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: PostExchanges
summary: Create Exchange
description: Create a exchange.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostOrderExchangesReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "{value}",
"metadata": {}
}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeOrderResponse'
'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: beginExchangeOrderWorkflow
/admin/exchanges/{id}:
get:
operationId: GetExchangesId
summary: Get an Exchange
description: Retrieve an exchange by its ID. You can expand the exchange's relations or select the fields that should be returned using query parameters.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/exchanges/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeResponse'
'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'
/admin/exchanges/{id}/cancel:
post:
operationId: PostExchangesIdCancel
summary: Add Cancels to Exchange
description: Add a list of cancels to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostCancelExchangeReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/cancel' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeResponse'
'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: cancelOrderExchangeWorkflow
/admin/exchanges/{id}/inbound/items:
post:
operationId: PostExchangesIdInboundItems
summary: Add Items to Exchange
description: Add a list of items to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostExchangesReturnRequestItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/inbound/items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeReturnResponse'
'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: orderExchangeRequestItemReturnWorkflow
/admin/exchanges/{id}/inbound/items/{action_id}:
post:
operationId: PostExchangesIdInboundItemsAction_id
summary: Add Items to Exchange
description: Add a list of items to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The exchange's action id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostExchangesRequestItemsReturnActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/inbound/items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeReturnResponse'
'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: updateRequestItemReturnWorkflow
delete:
operationId: DeleteExchangesIdInboundItemsAction_id
summary: Remove Inbound Item from Exchange
x-sidebar-summary: Remove Inbound Item
description: |
Remove an inbound (or return) item from an exchange using the `ID` of the item's `RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the return item's `RETURN_ITEM` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/exchanges/{id}/inbound/items/{action_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeReturnResponse'
'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: removeItemReturnActionWorkflow
/admin/exchanges/{id}/inbound/shipping-method:
post:
operationId: PostExchangesIdInboundShippingMethod
summary: Add Shipping Methods to Exchange
description: Add a list of shipping methods to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsShippingReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/inbound/shipping-method' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipping_option_id": "{value}"
}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeReturnResponse'
'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: createExchangeShippingMethodWorkflow
/admin/exchanges/{id}/inbound/shipping-method/{action_id}:
post:
operationId: PostExchangesIdInboundShippingMethodAction_id
summary: Add Shipping Methods to Exchange
description: Add a list of shipping methods to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The exchange's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostExchangesShippingActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/inbound/shipping-method/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangePreviewResponse'
'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: updateReturnShippingMethodWorkflow
delete:
operationId: DeleteExchangesIdInboundShippingMethodAction_id
summary: Remove Inbound Shipping Method from Exchange
x-sidebar-summary: Remove Inbound Shipping Method
description: |
Remove the shipping method for returning items in the exchange using the `ID` of the method's `SHIPPING_ADD` action.
Every shipping method has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the shipping method's `SHIPPING_ADD` action.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/exchanges/{id}/inbound/shipping-method/{action_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeReturnResponse'
'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: removeReturnShippingMethodWorkflow
/admin/exchanges/{id}/outbound/items:
post:
operationId: PostExchangesIdOutboundItems
summary: Add Items to Exchange
description: Add a list of items to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostExchangesAddItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/outbound/items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangePreviewResponse'
'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: orderExchangeAddNewItemWorkflow
/admin/exchanges/{id}/outbound/items/{action_id}:
post:
operationId: PostExchangesIdOutboundItemsAction_id
summary: Add Items to Exchange
description: Add a list of items to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The exchange's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostExchangesItemsActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/outbound/items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangePreviewResponse'
'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: updateExchangeAddItemWorkflow
delete:
operationId: DeleteExchangesIdOutboundItemsAction_id
summary: Remove Outbound Item from Exchange
x-sidebar-summary: Remove Outbound Item
description: |
Remove an outbound (or new) item from an exchange using the `ID` of the item's `ITEM_ADD` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the new exchange item's `ITEM_ADD` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/exchanges/{id}/outbound/items/{action_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangePreviewResponse'
'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: removeItemExchangeActionWorkflow
/admin/exchanges/{id}/outbound/shipping-method:
post:
operationId: PostExchangesIdOutboundShippingMethod
summary: Add Shipping Methods to Exchange
description: Add a list of shipping methods to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostExchangesShippingReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/outbound/shipping-method' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipping_option_id": "{value}"
}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangePreviewResponse'
'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: createExchangeShippingMethodWorkflow
/admin/exchanges/{id}/outbound/shipping-method/{action_id}:
post:
operationId: PostExchangesIdOutboundShippingMethodAction_id
summary: Add Shipping Methods to Exchange
description: Add a list of shipping methods to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The exchange's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostExchangesShippingActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/outbound/shipping-method/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangePreviewResponse'
'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: updateExchangeShippingMethodWorkflow
delete:
operationId: DeleteExchangesIdOutboundShippingMethodAction_id
summary: Remove Outbound Shipping Method from Exchange
x-sidebar-summary: Remove Outbound Shipping Method
description: |
Remove the shipping method for delivering outbound items in the exchange using the `ID` of the method's `SHIPPING_ADD` action.
Every shipping method has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the shipping method's `SHIPPING_ADD` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/exchanges/{id}/outbound/shipping-method/{action_id}''\ -H ''x-medusa-access-token: {api_token}'''
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangePreviewResponse'
'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: removeExchangeShippingMethodWorkflow
/admin/exchanges/{id}/request:
post:
operationId: PostExchangesIdRequest
summary: Add Requests to Exchange
description: Add a list of requests to a exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/exchanges/{id}/request' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeRequestResponse'
'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: confirmExchangeRequestWorkflow
requestBody:
content:
application/json:
schema: {}
delete:
operationId: DeleteExchangesIdRequest
summary: Cancel Exchange Request
description: Cancel a requested exchange.
x-authenticated: true
parameters:
- name: id
in: path
description: The exchange's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/exchanges/{id}/request' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Exchanges
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExchangeDeleteResponse'
'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: cancelBeginOrderExchangeWorkflow
/admin/fulfillment-providers:
get:
operationId: GetFulfillmentProviders
summary: List Fulfillment Providers
description: Retrieve a list of fulfillment providers. The fulfillment providers can be filtered by fields such as `id`. The fulfillment providers can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 a fulfillment provider's ID.
- type: array
description: Filter by fulfillment provider IDs.
items:
type: string
title: id
description: A fulfillment provider ID.
- name: is_enabled
in: query
description: Filter by whether the fulfillment provider is enabled.
required: false
schema:
type: boolean
title: is_enabled
description: Filter by whether the fulfillment provider is enabled.
- name: q
in: query
description: Search term to filter a fulfillment provider's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter a fulfillment provider's searchable properties.
- name: stock_location_id
in: query
required: false
schema:
oneOf:
- type: string
title: stock_location_id
description: Filter by associated stock location's ID.
- type: array
description: Filter by associated stock location IDs.
items:
type: string
title: stock_location_id
description: A stock location's ID.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/fulfillment-providers' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Fulfillment Providers
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFulfillmentProviderListResponse'
'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'
/admin/fulfillment-sets/{id}:
delete:
operationId: DeleteFulfillmentSetsId
summary: Delete Fulfillment Set
description: Delete a fulfillment set.
x-authenticated: true
parameters:
- name: id
in: path
description: The fulfillment set's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/fulfillment-sets/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Fulfillment Sets
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFulfillmentSetDeleteResponse'
'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: deleteFulfillmentSetsWorkflow
/admin/fulfillment-sets/{id}/service-zones:
post:
operationId: PostFulfillmentSetsIdServiceZones
summary: Add Service Zones to Fulfillment Set
description: Add a list of service zones to a fulfillment set.
x-authenticated: true
parameters:
- name: id
in: path
description: The fulfillment set's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- name
properties:
name:
type: string
title: name
description: The fulfillment set's name.
geo_zones:
type: array
description: The fulfillment set's geo zones.
items:
oneOf:
- type: object
description: The geo zone's geo zones.
required:
- metadata
- country_code
- type
properties:
metadata:
type: object
description: The geo zone's metadata.
country_code:
type: string
title: country_code
description: The geo zone's country code.
type:
type: string
title: type
description: The geo zone's type.
- type: object
description: The geo zone's geo zones.
required:
- metadata
- country_code
- type
- province_code
properties:
metadata:
type: object
description: The geo zone's metadata.
country_code:
type: string
title: country_code
description: The geo zone's country code.
type:
type: string
title: type
description: The geo zone's type.
province_code:
type: string
title: province_code
description: The geo zone's province code.
- type: object
description: The geo zone's geo zones.
required:
- metadata
- country_code
- type
- province_code
- city
properties:
metadata:
type: object
description: The geo zone's metadata.
country_code:
type: string
title: country_code
description: The geo zone's country code.
type:
type: string
title: type
description: The geo zone's type.
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.
- type: object
description: The geo zone's geo zones.
required:
- metadata
- country_code
- type
- province_code
- city
- postal_expression
properties:
metadata:
type: object
description: The geo zone's metadata.
country_code:
type: string
title: country_code
description: The geo zone's country code.
type:
type: string
title: type
description: The geo zone's type.
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.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/fulfillment-sets/{id}/service-zones' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Layla"
}'
tags:
- Fulfillment Sets
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFulfillmentSetResponse'
'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: createServiceZonesWorkflow
/admin/fulfillment-sets/{id}/service-zones/{zone_id}:
get:
operationId: GetFulfillmentSetsIdServiceZonesZone_id
summary: Get a Service Zone in a Fulfillment Set
x-sidebar-summary: Get a Service Zone
description: Retrieve a service zone that belongs to a fulfillment set. be paginated.
x-authenticated: true
parameters:
- name: id
in: path
description: The fulfillment set's ID.
required: true
schema:
type: string
- name: zone_id
in: path
description: The service zone's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/fulfillment-sets/{id}/service-zones/{zone_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Fulfillment Sets
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminServiceZoneResponse'
'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: PostFulfillmentSetsIdServiceZonesZone_id
summary: Add Service Zones to Fulfillment Set
description: Add a list of service zones to a fulfillment set.
x-authenticated: true
parameters:
- name: id
in: path
description: The fulfillment set's ID.
required: true
schema:
type: string
- name: zone_id
in: path
description: The fulfillment set's zone id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- name
properties:
name:
type: string
title: name
description: The fulfillment set's name.
geo_zones:
type: array
description: The fulfillment set's geo zones.
items:
oneOf:
- type: object
description: The geo zone's geo zones.
required:
- type
- metadata
- country_code
properties:
type:
type: string
title: type
description: The geo zone's type.
metadata:
type: object
description: The geo zone's metadata.
country_code:
type: string
title: country_code
description: The geo zone's country code.
id:
type: string
title: id
description: The geo zone's ID.
- type: object
description: The geo zone's geo zones.
required:
- type
- metadata
- country_code
- province_code
properties:
type:
type: string
title: type
description: The geo zone's type.
metadata:
type: object
description: The geo zone's metadata.
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.
id:
type: string
title: id
description: The geo zone's ID.
- type: object
description: The geo zone's geo zones.
required:
- type
- metadata
- city
- country_code
- province_code
properties:
type:
type: string
title: type
description: The geo zone's type.
metadata:
type: object
description: The geo zone's metadata.
city:
type: string
title: city
description: The geo zone's city.
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.
id:
type: string
title: id
description: The geo zone's ID.
- type: object
description: The geo zone's geo zones.
required:
- type
- metadata
- city
- country_code
- province_code
- postal_expression
properties:
type:
type: string
title: type
description: The geo zone's type.
metadata:
type: object
description: The geo zone's metadata.
city:
type: string
title: city
description: The geo zone's city.
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.
postal_expression:
type: object
description: The geo zone's postal expression.
id:
type: string
title: id
description: The geo zone's ID.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/fulfillment-sets/{id}/service-zones/{zone_id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Elvis"
}'
tags:
- Fulfillment Sets
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFulfillmentSetResponse'
'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: updateServiceZonesWorkflow
delete:
operationId: DeleteFulfillmentSetsIdServiceZonesZone_id
summary: Remove a Service Zone from Fulfillment Set
x-sidebar-summary: Remove Service Zone
description: Remove a service zone that belongs to a fulfillment set.
x-authenticated: true
parameters:
- name: id
in: path
description: The fulfillment set's ID.
required: true
schema:
type: string
- name: zone_id
in: path
description: The service zone's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/fulfillment-sets/{id}/service-zones/{zone_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Fulfillment Sets
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminServiceZoneDeleteResponse'
'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: deleteServiceZonesWorkflow
/admin/fulfillments:
post:
operationId: PostFulfillments
summary: Create Fulfillment
description: Create a fulfillment.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateFulfillment'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/fulfillments' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"location_id": "{value}",
"provider_id": "{value}",
"delivery_address": {
"first_name": "{value}",
"last_name": "{value}",
"phone": "{value}",
"company": "{value}",
"address_1": "{value}",
"address_2": "{value}",
"city": "{value}",
"country_code": "{value}",
"province": "{value}",
"postal_code": "{value}",
"metadata": {}
},
"items": [
{
"title": "{value}",
"sku": "{value}",
"quantity": 1667318922870784,
"barcode": "{value}",
"line_item_id": "{value}",
"inventory_item_id": "{value}"
}
],
"labels": [
{
"tracking_number": "{value}",
"tracking_url": "{value}",
"label_url": "{value}"
}
],
"order": {},
"order_id": "{value}",
"shipping_option_id": "{value}",
"data": {},
"packed_at": "2024-11-12T18:37:37.122Z",
"shipped_at": "2025-04-13T12:39:42.432Z",
"delivered_at": "2025-01-29T19:05:57.056Z",
"canceled_at": "2025-02-16T02:12:11.763Z",
"metadata": {}
}'
tags:
- Fulfillments
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFulfillmentResponse'
'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: createFulfillmentWorkflow
/admin/fulfillments/{id}/cancel:
post:
operationId: PostFulfillmentsIdCancel
summary: Add Cancels to Fulfillment
description: Add a list of cancels to a fulfillment.
x-authenticated: true
parameters:
- name: id
in: path
description: The fulfillment's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCancelFulfillment'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/fulfillments/{id}/cancel' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Fulfillments
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFulfillmentResponse'
'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: cancelFulfillmentWorkflow
/admin/fulfillments/{id}/shipment:
post:
operationId: PostFulfillmentsIdShipment
summary: Add Shipments to Fulfillment
description: Add a list of shipments to a fulfillment.
x-authenticated: true
parameters:
- name: id
in: path
description: The fulfillment's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateShipment'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/fulfillments/{id}/shipment' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"labels": [
{
"tracking_number": "{value}",
"tracking_url": "{value}",
"label_url": "{value}"
}
]
}'
tags:
- Fulfillments
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFulfillmentResponse'
'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: createShipmentWorkflow
/admin/inventory-items:
get:
operationId: GetInventoryItems
summary: List Inventory Items
description: Retrieve a list of inventory items. The inventory items can be filtered by fields such as `id`. The inventory items can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: The inventory item's q.
required: false
schema:
type: string
title: q
description: The inventory item's q.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: The inventory item's ID.
- type: array
description: The inventory item's ID.
items:
type: string
title: id
description: The id's ID.
- name: sku
in: query
required: false
schema:
oneOf:
- type: string
title: sku
description: The inventory item's sku.
- type: array
description: The inventory item's sku.
items:
type: string
title: sku
description: The sku's details.
- name: origin_country
in: query
required: false
schema:
oneOf:
- type: string
title: origin_country
description: The inventory item's origin country.
- type: array
description: The inventory item's origin country.
items:
type: string
title: origin_country
description: The origin country's details.
- name: mid_code
in: query
required: false
schema:
oneOf:
- type: string
title: mid_code
description: The inventory item's mid code.
- type: array
description: The inventory item's mid code.
items:
type: string
title: mid_code
description: The mid code's details.
- name: hs_code
in: query
required: false
schema:
oneOf:
- type: string
title: hs_code
description: The inventory item's hs code.
- type: array
description: The inventory item's hs code.
items:
type: string
title: hs_code
description: The hs code's details.
- name: material
in: query
required: false
schema:
oneOf:
- type: string
title: material
description: The inventory item's material.
- type: array
description: The inventory item's material.
items:
type: string
title: material
description: The material's details.
- name: requires_shipping
in: query
description: The inventory item's requires shipping.
required: false
schema:
type: boolean
title: requires_shipping
description: The inventory item's requires shipping.
- name: weight
in: query
description: Filter the inventory item's weight.
required: false
schema:
description: Filter the inventory item's weight.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: length
in: query
description: Filter the inventory item's length.
required: false
schema:
description: Filter the inventory item's length.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: height
in: query
description: Filter by the inventory item's height.
required: false
schema:
description: Filter by the inventory item's height.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: width
in: query
description: Filter by the inventory item's width.
required: false
schema:
description: Filter by the inventory item's width.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: location_levels
in: query
description: Filter by the inventory item's associated location IDs.
required: false
schema:
type: object
description: Filter by the inventory item's associated location IDs.
properties:
location_id:
oneOf:
- type: string
title: location_id
description: The associated location's ID.
- type: array
description: The location IDs to retrieve inventory items associated with them.
items:
type: string
title: location_id
description: A location's ID.
required:
- location_id
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/inventory-items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The inventory item's limit.
offset:
type: number
title: offset
description: The inventory item's offset.
count:
type: number
title: count
description: The inventory item's count.
- type: object
description: SUMMARY
required:
- inventory_items
properties:
inventory_items:
type: array
description: The inventory item's inventory items.
items:
$ref: '#/components/schemas/AdminInventoryItem'
'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: PostInventoryItems
summary: Create Inventory Item
description: Create a inventory item.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateInventoryItem'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/inventory-items' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"sku": "{value}",
"hs_code": "{value}",
"weight": 2857134683324416,
"length": 2322256963305472,
"height": 8391220613087232,
"width": 1297863250280448,
"origin_country": "{value}",
"mid_code": "{value}",
"material": "{value}",
"title": "{value}",
"description": "{value}",
"thumbnail": "{value}",
"metadata": {}
}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminInventoryItemResponse'
'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: createInventoryItemsWorkflow
/admin/inventory-items/{id}:
get:
operationId: GetInventoryItemsId
summary: Get a Inventory Item
description: Retrieve a inventory item by its ID. You can expand the inventory item's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/inventory-items/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminInventoryItemResponse'
'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: PostInventoryItemsId
summary: Update a Inventory Item
description: Update a inventory item's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- sku
- hs_code
- weight
- length
- height
- width
- origin_country
- mid_code
- material
- title
- description
- thumbnail
- metadata
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 inventory item's description.
requires_shipping:
type: boolean
title: requires_shipping
description: The inventory item's requires shipping.
thumbnail:
type: string
title: thumbnail
description: The inventory item's thumbnail.
metadata:
type: object
description: The inventory item's metadata.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/inventory-items/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"sku": "{value}",
"hs_code": "{value}",
"weight": 8979922215239680,
"length": 667491233693696,
"height": 6328111551479808,
"width": 7175104570064896,
"origin_country": "{value}",
"mid_code": "{value}",
"material": "{value}",
"title": "{value}",
"description": "{value}",
"thumbnail": "{value}",
"metadata": {}
}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminInventoryItemResponse'
'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: updateInventoryItemsWorkflow
delete:
operationId: DeleteInventoryItemsId
summary: Delete Inventory Item
description: Delete an inventory item.
x-authenticated: true
parameters:
- name: id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/inventory-items/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The inventory item's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: inventory_item
deleted:
type: boolean
title: deleted
description: Whether the inventory item was deleted.
'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: deleteInventoryItemWorkflow
/admin/inventory-items/{id}/location-levels:
get:
operationId: GetInventoryItemsIdLocationLevels
summary: List Inventory Levels
description: Retrieve a list of inventory levels associated with an inventory item. The inventory levels can be filtered by fields like `location_id`. The inventory levels can also be paginated.
x-authenticated: true
parameters:
- name: id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: location_id
in: query
required: false
schema:
oneOf:
- type: string
title: location_id
description: Filter by an associated location's ID.
- type: array
description: Filter by associated location IDs.
items:
type: string
title: location_id
description: An associated location ID.
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/inventory-items/{id}/location-levels' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The inventory item's limit.
offset:
type: number
title: offset
description: The inventory item's offset.
count:
type: number
title: count
description: The inventory item's count.
- type: object
description: SUMMARY
required:
- inventory_levels
properties:
inventory_levels:
type: array
description: The inventory item's inventory levels.
items:
$ref: '#/components/schemas/InventoryLevel'
'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: PostInventoryItemsIdLocationLevels
summary: Add Location Levels to Inventory Item
description: Add a list of location levels to a inventory item.
x-authenticated: true
parameters:
- name: id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- location_id
properties:
location_id:
type: string
title: location_id
description: The inventory item's location id.
stocked_quantity:
type: number
title: stocked_quantity
description: The inventory item's stocked quantity.
incoming_quantity:
type: number
title: incoming_quantity
description: The inventory item's incoming quantity.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"location_id": "{value}"
}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminInventoryItemResponse'
'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: createInventoryLevelsWorkflow
/admin/inventory-items/{id}/location-levels/batch:
post:
operationId: PostInventoryItemsIdLocationLevelsBatch
summary: Add Location Levels to Inventory Item
description: Add a list of location levels to a inventory item.
x-authenticated: true
parameters:
- name: id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
create:
type: array
description: The inventory item's create.
items:
type: object
description: The create's details.
required:
- location_id
properties:
location_id:
type: string
title: location_id
description: The create's location id.
stocked_quantity:
type: number
title: stocked_quantity
description: The create's stocked quantity.
incoming_quantity:
type: number
title: incoming_quantity
description: The create's incoming quantity.
update:
type: array
description: The inventory item's update.
items:
type: object
description: The update's details.
properties:
stocked_quantity:
type: number
title: stocked_quantity
description: The update's stocked quantity.
incoming_quantity:
type: number
title: incoming_quantity
description: The update's incoming quantity.
delete:
type: array
description: The inventory item's delete.
items:
type: string
title: delete
description: The delete's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- inventory_item
properties:
inventory_item:
type: object
description: The inventory item'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: bulkCreateDeleteLevelsWorkflow
/admin/inventory-items/{id}/location-levels/{location_id}:
post:
operationId: PostInventoryItemsIdLocationLevelsLocation_id
summary: Add Location Levels to Inventory Item
description: Add a list of location levels to a inventory item.
x-authenticated: true
parameters:
- name: id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
- name: location_id
in: path
description: The inventory item's location id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
stocked_quantity:
type: number
title: stocked_quantity
description: The inventory item's stocked quantity.
incoming_quantity:
type: number
title: incoming_quantity
description: The inventory item's incoming quantity.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminInventoryItemResponse'
'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: updateInventoryLevelsWorkflow
delete:
operationId: DeleteInventoryItemsIdLocationLevelsLocation_id
summary: Remove Inventory Level of Inventory Item
x-sidebar-summary: Remove Inventory Level
description: |
Remove the inventory level of an inventory item.
If the inventory level has reserved quantity greater than `0`, an error is thrown.
x-authenticated: true
parameters:
- name: id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
- name: location_id
in: path
description: The inventory item's location id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: 'curl -X DELETE ''{backend_url}/admin/inventory-items/{id}/location-levels/{location_id}'' \ -H ''x-medusa-access-token: {api_token}'''
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The inventory item's ID.
object:
type: string
title: object
description: The name of the deleted object.
deleted:
type: boolean
title: deleted
description: Whether the Inventory Item was deleted.
- type: object
description: SUMMARY
properties:
parent:
$ref: '#/components/schemas/AdminInventoryItem'
description: SUMMARY
'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: deleteInventoryLevelsWorkflow
/admin/invites:
get:
operationId: GetInvites
summary: List Invites
description: Retrieve a list of invites. The invites can be filtered by fields such as `id`. The invites can also be sorted or paginated.
x-authenticated: false
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 apply on an invite's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to apply on an invite's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by an invite's ID.
- type: array
description: Filter by invite IDs.
items:
type: string
title: id
description: An invite's ID.
- name: email
in: query
required: false
schema:
oneOf:
- type: string
title: email
description: Filter by an invite's email.
format: email
- type: array
description: Filter by invite emails.
items:
type: string
title: email
description: An email.
format: email
- name: created_at
in: query
description: Filter by the invite's creation date.
required: false
schema:
type: object
description: Filter by the invite's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by the invite's update date.
required: false
schema:
type: object
description: Filter by the invite's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by the invite's deletion date.
required: false
schema:
type: object
description: Filter by the invite'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`).
- 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: 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}/admin/invites'
tags:
- Invites
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of invites.
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The maximum number of items retrieved.
offset:
type: number
title: offset
description: The number of items skipped before the returned items.
count:
type: number
title: count
description: The total number of items.
- type: object
description: The paginated list of invites.
required:
- invites
properties:
invites:
type: array
description: The list of invites.
items:
$ref: '#/components/schemas/AdminInvite'
'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: PostInvites
summary: Create Invite
description: Create a invite.
x-authenticated: false
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- email
properties:
email:
type: string
title: email
description: The invite's email.
format: email
metadata:
type: object
description: The invite's metadata.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/invites' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "Whitney_Schultz@gmail.com"
}'
tags:
- Invites
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminInviteResponse'
'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: createInvitesWorkflow
/admin/invites/accept:
post:
operationId: PostInvitesAccept
summary: Create Invite
description: Create a invite.
x-authenticated: false
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- email
- first_name
- last_name
properties:
email:
type: string
title: email
description: The invite's email.
format: email
first_name:
type: string
title: first_name
description: The invite's first name.
last_name:
type: string
title: last_name
description: The invite's last name.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/invites/accept' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "Lila_Zemlak@hotmail.com",
"first_name": "{value}",
"last_name": "{value}"
}'
tags:
- Invites
responses:
'200':
description: OK
content:
application/json:
schema:
oneOf:
- type: object
description: SUMMARY
required:
- user
properties:
user:
$ref: '#/components/schemas/AdminUser'
- type: object
description: SUMMARY
required:
- message
properties:
message:
type: string
title: message
description: The invite's message.
'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: acceptInviteWorkflow
/admin/invites/{id}:
get:
operationId: GetInvitesId
summary: Get an Invite
description: Retrieve an invite by its ID. You can expand the invite's relations or select the fields that should be returned.
x-authenticated: false
parameters:
- name: id
in: path
description: The invite's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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}/admin/invites/{id}'
tags:
- Invites
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminInviteResponse'
'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: DeleteInvitesId
summary: Delete Invite
description: Delete an invite.
x-authenticated: false
parameters:
- name: id
in: path
description: The invite's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X DELETE '{backend_url}/admin/invites/{id}'
tags:
- Invites
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The invite's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: invite
deleted:
type: boolean
title: deleted
description: Whether the invite was deleted.
'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: deleteInvitesWorkflow
/admin/invites/{id}/resend:
post:
operationId: PostInvitesIdResend
summary: Add Resends to Invite
description: Add a list of resends to a invite.
x-authenticated: false
parameters:
- name: id
in: path
description: The invite's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 -X POST '{backend_url}/admin/invites/{id}/resend'
tags:
- Invites
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminInviteResponse'
'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'
requestBody:
content:
application/json:
schema: {}
x-workflow: refreshInviteTokensWorkflow
/admin/notifications:
get:
operationId: GetNotifications
summary: List Notifications
description: Retrieve a list of notifications. The notifications can be filtered by fields such as `id`. The notifications can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 apply on the notification's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to apply on the notification's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a notification ID.
- type: array
description: Filter by notification IDs.
items:
type: string
title: id
description: A notification ID.
- name: channel
in: query
required: false
schema:
oneOf:
- type: string
title: channel
description: Filter by a notification channel.
example: email
- type: array
description: Filter by notification channels.
items:
type: string
title: channel
description: A notification channel.
example: email
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/notifications' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Notifications
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminNotificationListResponse'
'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'
/admin/notifications/{id}:
get:
operationId: GetNotificationsId
summary: Get a Notification
description: Retrieve a notification by its ID. You can expand the notification's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The notification's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/notifications/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Notifications
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminNotificationResponse'
'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'
/admin/order-edits:
post:
operationId: PostOrderEdits
summary: Create Order Edit
description: Create a order edit.
x-authenticated: true
parameters: []
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostOrderEditsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/order-edits' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "{value}",
"metadata": {}
}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditResponse'
'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: beginOrderEditOrderWorkflow
/admin/order-edits/{id}:
delete:
operationId: DeleteOrderEditsId
summary: Cancel Order Edit
description: Cancel an order edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/order-edits/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The order edit's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: order-edit
deleted:
type: boolean
title: deleted
description: Whether the order edit was deleted.
'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: cancelBeginOrderEditWorkflow
/admin/order-edits/{id}/confirm:
post:
operationId: PostOrderEditsIdConfirm
summary: Add Confirms to Order Edit
description: Add a list of confirms to a order edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/order-edits/{id}/confirm' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: confirmOrderEditRequestWorkflow
requestBody:
content:
application/json:
schema: {}
/admin/order-edits/{id}/items:
post:
operationId: PostOrderEditsIdItems
summary: Add Items to Order Edit
description: Add a list of items to a order edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostOrderEditsAddItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/order-edits/{id}/items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: orderEditAddNewItemWorkflow
/admin/order-edits/{id}/items/item/{item_id}:
post:
operationId: PostOrderEditsIdItemsItemItem_id
summary: Add Items to Order Edit
description: Add a list of items to a order edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
- name: item_id
in: path
description: The order edit's item id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostOrderEditsUpdateItemQuantityReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/order-edits/{id}/items/item/{item_id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 7564330046324736
}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: orderEditUpdateItemQuantityWorkflow
/admin/order-edits/{id}/items/{action_id}:
post:
operationId: PostOrderEditsIdItemsAction_id
summary: Add Items to Order Edit
description: Add a list of items to a order edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The order edit's action id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostOrderEditsItemsActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/order-edits/{id}/items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: updateOrderEditAddItemWorkflow
delete:
operationId: DeleteOrderEditsIdItemsAction_id
summary: Remove Item from Order Edit
x-sidebar-summary: Remove Item
description: |
Remove an added item in the order edit by the ID of the item's `ITEM_ADD` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the new item's `ITEM_ADD` action.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/order-edits/{id}/items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: removeItemOrderEditActionWorkflow
/admin/order-edits/{id}/request:
post:
operationId: PostOrderEditsIdRequest
summary: Add Requests to Order Edit
description: Add a list of requests to a order edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/order-edits/{id}/request' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: requestOrderEditRequestWorkflow
requestBody:
content:
application/json:
schema: {}
/admin/order-edits/{id}/shipping-method:
post:
operationId: PostOrderEditsIdShippingMethod
summary: Add Shipping Methods to Order Edit
description: Add a list of shipping methods to a order edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostOrderEditsShippingReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/order-edits/{id}/shipping-method' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipping_option_id": "{value}"
}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: createOrderEditShippingMethodWorkflow
/admin/order-edits/{id}/shipping-method/{action_id}:
post:
operationId: PostOrderEditsIdShippingMethodAction_id
summary: Add Shipping Methods to Order Edit
description: Add a list of shipping methods to a order edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The order edit's action id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostOrderEditsShippingActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/order-edits/{id}/shipping-method/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: updateOrderEditShippingMethodWorkflow
delete:
operationId: DeleteOrderEditsIdShippingMethodAction_id
summary: Remove Shipping Method from Order Edit
x-sidebar-summary: Remove Shipping Method
description: |
Remove a shipping method in the order edit by the ID of the method's `SHIPPING_ADD` action.
Every shipping method has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The order edit's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the shipping method's `SHIPPING_ADD` action.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/order-edits/{id}/shipping-method/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Order Edits
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderEditPreviewResponse'
'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: removeOrderEditShippingMethodWorkflow
/admin/orders:
get:
operationId: GetOrders
summary: List Orders
description: Retrieve a list of orders. The orders can be filtered by fields such as `id`. The orders can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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's ID.
- name: status
in: query
required: false
schema:
oneOf:
- type: string
title: status
description: Filter by the order's status.
- type: array
description: Filter by order statuses.
items:
type: string
title: status
description: An order's status.
- 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: sales_channel_id
in: query
description: The order's sales channel id.
required: false
schema:
type: array
description: The order's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
- name: fulfillment_status
in: query
description: The order's fulfillment status.
required: false
schema:
type: array
description: The order's fulfillment status.
items:
type: string
description: The fulfillment status's details.
enum:
- canceled
- not_fulfilled
- partially_fulfilled
- fulfilled
- partially_shipped
- shipped
- partially_delivered
- delivered
- name: payment_status
in: query
description: The order's payment status.
required: false
schema:
type: array
description: The order's payment status.
items:
type: string
description: The payment status's details.
enum:
- canceled
- not_paid
- awaiting
- authorized
- partially_authorized
- captured
- partially_captured
- partially_refunded
- refunded
- requires_action
- name: region_id
in: query
description: The order's region id.
required: false
schema:
type: array
description: The order's region id.
items:
type: string
title: region_id
description: The region id's details.
- name: q
in: query
description: The order's q.
required: false
schema:
type: string
title: q
description: The order's q.
- name: created_at
in: query
description: The order's created at.
required: false
schema:
type: object
description: The order's created at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: The order's updated at.
required: false
schema:
type: object
description: The order's updated at.
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.
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`).
- 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`).
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/orders' \
-H 'x-medusa-access-token: {api_token}'
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 the returned items.
count:
type: number
title: count
description: The total count of items.
- type: object
description: The paginated list of orders.
required:
- orders
properties:
orders:
type: array
description: The list of orders.
items:
$ref: '#/components/schemas/AdminOrder'
'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: getOrdersListWorkflow
/admin/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: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/orders/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderResponse'
'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
post:
operationId: PostOrdersId
summary: Update a Order
description: Update a order's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/orders/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderResponse'
'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'
requestBody:
content:
application/json:
schema: {}
/admin/orders/{id}/archive:
post:
operationId: PostOrdersIdArchive
summary: Add Archives to Order
description: Add a list of archives to a order.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminArchiveOrder'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/orders/{id}/archive' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "{value}"
}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderResponse'
'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: archiveOrderWorkflow
/admin/orders/{id}/cancel:
post:
operationId: PostOrdersIdCancel
summary: Add Cancels to Order
description: Add a list of cancels to a order.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/orders/{id}/cancel' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderResponse'
'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'
requestBody:
content:
application/json:
schema: {}
x-workflow: cancelOrderWorkflow
/admin/orders/{id}/changes:
get:
operationId: GetOrdersIdChanges
summary: List Changes on an Order
x-sidebar-summary: List Changes
description: |
Retrieve a list of changes made on an order, including returns, exchanges, etc...
The changes can be filtered by fields like FILTER FIELDS. The changes can also be paginated.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/orders/{id}/changes' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderChangesResponse'
'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'
/admin/orders/{id}/complete:
post:
operationId: PostOrdersIdComplete
summary: Add Completes to Order
description: Add a list of completes to a order.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- order_id
properties:
order_id:
type: string
title: order_id
description: The order's order id.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/orders/{id}/complete' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "{value}"
}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderResponse'
'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: completeOrderWorkflow
/admin/orders/{id}/fulfillments:
post:
operationId: PostOrdersIdFulfillments
summary: Add Fulfillments to Order
description: Add a list of fulfillments to a order.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- items
- location_id
- metadata
properties:
items:
type: array
description: The order's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
location_id:
type: string
title: location_id
description: The order's location id.
no_notification:
type: boolean
title: no_notification
description: The order's no notification.
metadata:
type: object
description: The order's metadata.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/orders/{id}/fulfillments' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"items": [
{
"id": "id_YePfQ6PBCBKvmYyreUt2",
"quantity": 6623610359775232
}
],
"location_id": "{value}",
"metadata": {}
}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderResponse'
'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: createOrderFulfillmentWorkflow
/admin/orders/{id}/fulfillments/{fulfillment_id}/cancel:
post:
operationId: PostOrdersIdFulfillmentsFulfillment_idCancel
summary: Add Cancels to Order
description: Add a list of cancels to a order.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: fulfillment_id
in: path
description: The order's fulfillment id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
properties:
no_notification:
type: boolean
title: no_notification
description: The order's no notification.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/cancel' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderResponse'
'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: cancelOrderFulfillmentWorkflow
/admin/orders/{id}/fulfillments/{fulfillment_id}/shipments:
post:
operationId: PostOrdersIdFulfillmentsFulfillment_idShipments
summary: Add Shipments to Order
description: Add a list of shipments to a order.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: fulfillment_id
in: path
description: The order's fulfillment id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- items
- metadata
properties:
items:
type: array
description: The order's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
labels:
type: array
description: The order's labels.
items:
type: object
description: The label's labels.
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 label url.
no_notification:
type: boolean
title: no_notification
description: The order's no notification.
metadata:
type: object
description: The order's metadata.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/shipments' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"items": [
{
"id": "id_3QQtl2VvE73c",
"quantity": 6772917941567488
}
],
"metadata": {}
}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderResponse'
'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: createOrderShipmentWorkflow
/admin/orders/{id}/preview:
get:
operationId: GetOrdersIdPreview
summary: Get Preview
description: Retrieve a preview of an order using its associated change, such as an edit.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/orders/{id}/preview' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderPreviewResponse'
'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'
/admin/payment-collections:
post:
operationId: PostPaymentCollections
summary: Create Payment Collection
description: Create a payment collection.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- order_id
- amount
properties:
order_id:
type: string
title: order_id
description: The payment collection's order id.
amount:
type: number
title: amount
description: The payment collection's amount.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/payment-collections' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "{value}"
}'
tags:
- Payment Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPaymentCollectionResponse'
'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: createOrderPaymentCollectionWorkflow
/admin/payment-collections/{id}:
delete:
operationId: DeletePaymentCollectionsId
summary: Delete a Payment Collection
description: Delete a payment collection.
x-authenticated: true
parameters:
- name: id
in: path
description: The payment collection's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/payment-collections/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Payment Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminDeletePaymentCollectionResponse'
'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: deleteOrderPaymentCollections
/admin/payment-collections/{id}/mark-as-paid:
post:
operationId: PostPaymentCollectionsIdMarkAsPaid
summary: Add Mark As Paids to Payment Collection
description: Add a list of mark as paids to a payment collection.
x-authenticated: true
parameters:
- name: id
in: path
description: The payment collection's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- order_id
properties:
order_id:
type: string
title: order_id
description: The payment collection's order id.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/payment-collections/{id}/mark-as-paid' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "{value}"
}'
tags:
- Payment Collections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPaymentCollectionResponse'
'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: markPaymentCollectionAsPaid
/admin/payments:
get:
operationId: GetPayments
summary: List Payments
description: Retrieve a list of payments. The payments can be filtered by fields such as `id`. The payments can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 payment's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the payment's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a payment ID.
- type: array
description: Filter by payment IDs.
items:
type: string
title: id
description: A payment ID.
- name: payment_session_id
in: query
required: false
schema:
oneOf:
- type: string
title: payment_session_id
description: Filter by a payment session ID to retrieve its associated payments.
- type: array
description: Filter by payment session IDs to retrieve their associated payments.
items:
type: string
title: payment_session_id
description: A payment session's ID.
- name: created_at
in: query
description: Filter by the payment's creation date.
required: false
schema:
type: object
description: Filter by the payment's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by the payment's update date.
required: false
schema:
type: object
description: Filter by the payment's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by the payment's deletion date.
required: false
schema:
type: object
description: Filter by the payment'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`).
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/payments' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Payments
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of payments.
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The maximum number of returned items.
offset:
type: number
title: offset
description: The number of items skipped before the returned items.
count:
type: number
title: count
description: The total number of payments.
- type: object
description: The paginated list of payments.
required:
- payments
properties:
payments:
type: array
description: The list of payments.
items:
$ref: '#/components/schemas/AdminPayment'
'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'
/admin/payments/payment-providers:
get:
operationId: GetPaymentsPaymentProviders
summary: List Payment Providers
description: Retrieve a list of payment providers. The payment providers can be filtered by fields such as `id`. The payment providers can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: true
schema:
oneOf:
- type: string
title: id
description: Filter by a payment provider's ID.
- type: array
description: Filter by payment provider IDs.
items:
type: string
title: id
description: A payment provider ID.
- name: is_enabled
in: query
description: Filter by whether the payment provider is enabled.
required: false
schema:
type: boolean
title: is_enabled
description: Filter by whether the payment provider is enabled.
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/payments/payment-providers' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Payments
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 the returned items.
count:
type: number
title: count
description: The total number of items.
- type: object
description: The paginated list of payment providers.
required:
- payment_providers
properties:
payment_providers:
type: array
description: The list of payment providers.
items:
$ref: '#/components/schemas/AdminPaymentProvider'
'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'
/admin/payments/{id}:
get:
operationId: GetPaymentsId
summary: Get a Payment
description: Retrieve a payment by its ID. You can expand the payment's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The payment's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/payments/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Payments
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPaymentResponse'
'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'
/admin/payments/{id}/capture:
post:
operationId: PostPaymentsIdCapture
summary: Add Captures to Payment
description: Add a list of captures to a payment.
x-authenticated: true
parameters:
- name: id
in: path
description: The payment's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
amount:
type: number
title: amount
description: The payment's amount.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/payments/{id}/capture' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Payments
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPaymentResponse'
'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: capturePaymentWorkflow
/admin/payments/{id}/refund:
post:
operationId: PostPaymentsIdRefund
summary: Add Refunds to Payment
description: Add a list of refunds to a payment.
x-authenticated: true
parameters:
- name: id
in: path
description: The payment's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
amount:
type: number
title: amount
description: The payment's amount.
refund_reason_id:
type: string
title: refund_reason_id
description: The payment's refund reason id.
note:
type: string
title: note
description: The payment's note.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/payments/{id}/refund' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Payments
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPaymentResponse'
'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: refundPaymentWorkflow
/admin/price-lists:
get:
operationId: GetPriceLists
summary: List Price Lists
description: Retrieve a list of price lists. The price lists can be filtered by fields such as `id`. The price lists can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 price list's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the price list's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a price list ID.
- type: array
description: Filter by price list IDs.
items:
type: string
title: id
description: A price list ID.
- name: starts_at
in: query
description: Filter by a price list's start date.
required: false
schema:
type: object
description: Filter by a price list's start date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: ends_at
in: query
description: Filter by the price list's end date.
required: false
schema:
type: object
description: Filter by the price list's end date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: status
in: query
description: Filter by the price list's status.
required: false
schema:
type: array
description: Filter by the price list's status.
items:
type: string
description: A price list's status.
enum:
- active
- draft
- name: rules_count
in: query
description: Filter by the price list's rules count.
required: false
schema:
type: array
description: Filter by the price list's rules count.
items:
type: number
title: rules_count
description: The price list's rule count.
- name: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/price-lists' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Lists
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPriceListListResponse'
'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: PostPriceLists
summary: Create Price List
description: Create a price list.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreatePriceList'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/price-lists' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "{value}",
"description": "{value}",
"starts_at": "{value}",
"ends_at": "{value}"
}'
tags:
- Price Lists
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPriceListResponse'
'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: createPriceListsWorkflow
/admin/price-lists/{id}:
get:
operationId: GetPriceListsId
summary: Get a Price List
description: Retrieve a price list by its ID. You can expand the price list's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The price list's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/price-lists/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Lists
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPriceListResponse'
'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: PostPriceListsId
summary: Update a Price List
description: Update a price list's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The price list's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdatePriceList'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/price-lists/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"description": "{value}",
"starts_at": "{value}",
"ends_at": "{value}"
}'
tags:
- Price Lists
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPriceListResponse'
'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: updatePriceListsWorkflow
delete:
operationId: DeletePriceListsId
summary: Delete a Price List
description: Delete a price list.
x-authenticated: true
parameters:
- name: id
in: path
description: The price list's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/price-lists/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Lists
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPriceListDeleteResponse'
'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: deletePriceListsWorkflow
/admin/price-lists/{id}/prices/batch:
post:
operationId: PostPriceListsIdPricesBatch
summary: Add Prices to Price List
description: Add a list of prices to a price list.
x-authenticated: true
parameters:
- name: id
in: path
description: The price list's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
create:
type: array
description: The price list's create.
items:
type: object
description: The create's details.
required:
- currency_code
- amount
- variant_id
- min_quantity
- max_quantity
properties:
currency_code:
type: string
title: currency_code
description: The create's currency code.
amount:
type: number
title: amount
description: The create's amount.
variant_id:
type: string
title: variant_id
description: The create's variant id.
min_quantity:
type: number
title: min_quantity
description: The create's min quantity.
max_quantity:
type: number
title: max_quantity
description: The create's max quantity.
rules:
type: object
description: The create's rules.
update:
type: array
description: The price list's update.
items:
type: object
description: The update's details.
required:
- id
- variant_id
- min_quantity
- max_quantity
properties:
id:
type: string
title: id
description: The update's ID.
currency_code:
type: string
title: currency_code
description: The update's currency code.
amount:
type: number
title: amount
description: The update's amount.
variant_id:
type: string
title: variant_id
description: The update's variant id.
min_quantity:
type: number
title: min_quantity
description: The update's min quantity.
max_quantity:
type: number
title: max_quantity
description: The update's max quantity.
rules:
type: object
description: The update's rules.
delete:
type: array
description: The price list's delete.
items:
type: string
title: delete
description: The delete's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/price-lists/{id}/prices/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Lists
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPriceListBatchResponse'
'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: batchPriceListPricesWorkflow
/admin/price-lists/{id}/products:
post:
operationId: PostPriceListsIdProducts
summary: Add Products to Price List
description: Add a list of products to a price list.
x-authenticated: true
parameters:
- name: id
in: path
description: The price list's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The price list's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The price list's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/price-lists/{id}/products' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Lists
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPriceListResponse'
'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: batchPriceListPricesWorkflow
/admin/price-preferences:
get:
operationId: GetPricePreferences
summary: List Price Preferences
description: Retrieve a list of price preferences. The price preferences can be filtered by fields such as `id`. The price preferences can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 a price preference ID.
- type: array
description: Filter by price preference IDs.
items:
type: string
title: id
description: A price preference ID.
- name: attribute
in: query
required: false
schema:
oneOf:
- type: string
title: attribute
description: Filter by a price preference's attribute.
- type: array
description: Filter by price preference attributes.
items:
type: string
title: attribute
description: A price preference's attribute.
- name: value
in: query
required: false
schema:
oneOf:
- type: string
title: value
description: Filter by a price preference's value.
- type: array
description: Filter by price preference values.
items:
type: string
title: value
description: A price preference's value.
- name: q
in: query
description: Search term to apply on the price preference's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to apply on the price preference'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
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/price-preferences' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Preferences
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPricePreferenceListResponse'
'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: PostPricePreferences
summary: Create Price Preference
description: Create a price preference.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreatePricePreference'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/price-preferences' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Preferences
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPricePreferenceResponse'
'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: createPricePreferencesWorkflow
/admin/price-preferences/{id}:
get:
operationId: GetPricePreferencesId
summary: Get a Price Preference
description: Retrieve a price preference by its ID. You can expand the price preference's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The price preference's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/price-preferences/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Preferences
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPricePreferenceResponse'
'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: PostPricePreferencesId
summary: Update a Price Preference
description: Update a price preference's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The price preference's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdatePricePreference'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/price-preferences/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Preferences
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPricePreferenceResponse'
'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: updatePricePreferencesWorkflow
delete:
operationId: DeletePricePreferencesId
summary: Delete a Price Preference
description: Delete a price preference.
x-authenticated: true
parameters:
- name: id
in: path
description: The price preference's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/price-preferences/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Price Preferences
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPricePreferenceDeleteResponse'
'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: deletePricePreferencesWorkflow
/admin/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: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 on the product category's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter on the product category's searchable 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 the category's description. This performs a full-text search. To do keyword search, use the `q` parameter instead.
- type: array
description: Filter by category descriptions. This performs a full-text search. To do keyword search, use the `q` parameter instead.
items:
type: string
title: description
description: The category's 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 category's handle.
- name: parent_category_id
in: query
required: false
schema:
oneOf:
- type: string
title: parent_category_id
description: Filter by a parent category's ID to retrieve its child categories.
- type: array
description: Filter by parent category IDs to retrieve their child categories.
items:
type: string
title: parent_category_id
description: A parent category's ID.
- name: include_ancestors_tree
in: query
description: Whether to include the parent category of each category. If enabled, the parent category is set in the `parent_category` property of each category object.
required: false
schema:
type: boolean
title: include_ancestors_tree
description: Whether to include the parent category of each category. If enabled, the parent category is set in the `parent_category` property of each category object.
- name: include_descendants_tree
in: query
description: Whether to include the child categories of each category. If enabled, the child categories are added to the `category_children` property of each category object.
required: false
schema:
type: boolean
title: include_descendants_tree
description: Whether to include the child categories of each category. If enabled, the child categories are added to the `category_children` property of each category object.
- name: is_internal
in: query
description: Filter by whether the category is internal.
required: false
schema:
type: boolean
title: is_internal
description: Filter by whether the category is internal.
- name: is_active
in: query
description: Filter by whether the category is active.
required: false
schema:
type: boolean
title: is_active
description: Filter by whether the category is active.
- 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 an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by 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 an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by the category's deletion date.
required: false
schema:
type: object
description: Filter by the category'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`).
- 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: 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: name
in: query
required: false
schema:
oneOf:
- type: string
title: name
description: The product category's name.
- type: array
description: The product category's name.
items:
type: string
title: name
description: The name's details.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/product-categories' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductCategoryListResponse'
'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: PostProductCategories
summary: Create Product Category
description: Create a product category.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateProductCategory'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/product-categories' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Vesta",
"parent_category_id": "{value}",
"metadata": {}
}'
tags:
- Product Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductCategoryResponse'
'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: createProductCategoriesWorkflow
/admin/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: true
parameters:
- name: id
in: path
description: The product category's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: 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.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/product-categories/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductCategoryResponse'
'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: PostProductCategoriesId
summary: Update a Product Category
description: Update a product category's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The product category's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- parent_category_id
- metadata
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: The product category's is internal.
is_active:
type: boolean
title: is_active
description: The product category's is active.
parent_category_id:
type: string
title: parent_category_id
description: The product category's parent category id.
metadata:
type: object
description: The product category's metadata.
rank:
type: number
title: rank
description: The product category's rank.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/product-categories/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"parent_category_id": "{value}",
"metadata": {}
}'
tags:
- Product Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductCategoryResponse'
'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: updateProductCategoriesWorkflow
delete:
operationId: DeleteProductCategoriesId
summary: Delete a Product Category
description: Delete a product category. This doesn't deleted products in that category.
x-authenticated: true
parameters:
- name: id
in: path
description: The product category's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/product-categories/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductCategoryDeleteResponse'
'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: deleteProductCategoriesWorkflow
/admin/product-categories/{id}/products:
post:
operationId: PostProductCategoriesIdProducts
summary: Add Products to Product Category
description: Add a list of products to a product category.
x-authenticated: true
parameters:
- name: id
in: path
description: The product category's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The product category's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The product category's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/product-categories/{id}/products' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductCategoryResponse'
'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: batchLinkProductsToCategoryWorkflow
/admin/product-tags:
get:
operationId: GetProductTags
summary: List Product Tags
description: Retrieve a list of product tags. The product tags can be filtered by fields such as `id`. The product tags can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 tag's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the product tag's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a product tag's ID.
- type: array
description: Filter by product tag IDs.
items:
type: string
title: id
description: A product tag's ID.
- name: value
in: query
required: false
schema:
oneOf:
- type: string
title: value
description: Filter by a product tag's value.
- type: array
description: Filter by product tag values.
items:
type: string
title: value
description: A tag value.
- name: created_at
in: query
description: Filter by the tag's creation date.
required: false
schema:
type: object
description: Filter by the tag's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by the tag's update date.
required: false
schema:
type: object
description: Filter by the tag's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by the tag's deletion date.
required: false
schema:
type: object
description: Filter by the tag'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`).
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/product-tags' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Tags
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTagListResponse'
'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: PostProductTags
summary: Create Product Tag
description: Create a product tag.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateProductTag'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/product-tags' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"value": "{value}",
"metadata": {}
}'
tags:
- Product Tags
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTagResponse'
'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: createProductTagsWorkflow
/admin/product-tags/{id}:
get:
operationId: GetProductTagsId
summary: Get a Product Tag
description: Retrieve a product tag by its ID. You can expand the product tag's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The product tag's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/product-tags/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Tags
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTagResponse'
'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: PostProductTagsId
summary: Update a Product Tag
description: Update a product tag's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The product tag's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- metadata
properties:
value:
type: string
title: value
description: The product tag's value.
metadata:
type: object
description: The product tag's metadata.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/product-tags/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"metadata": {}
}'
tags:
- Product Tags
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTagResponse'
'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: updateProductTagsWorkflow
delete:
operationId: DeleteProductTagsId
summary: Delete a Product Tag
description: Delete a product tag. This doesn't delete products using the tag.
x-authenticated: true
parameters:
- name: id
in: path
description: The product tag's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/product-tags/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Tags
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTagDeleteResponse'
'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: deleteProductTagsWorkflow
/admin/product-types:
get:
operationId: GetProductTypes
summary: List Product Types
description: Retrieve a list of product types. The product types can be filtered by fields such as `id`. The product types can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 type's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the product type's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a product type's ID.
- type: array
description: Filter by product type IDs.
items:
type: string
title: id
description: A product type's ID.
- name: value
in: query
required: false
schema:
oneOf:
- type: string
title: value
description: Filter by a type's value.
- type: array
description: Filter by values.
items:
type: string
title: value
description: A type's value.
- name: created_at
in: query
description: Filter by the type's creation date.
required: false
schema:
type: object
description: Filter by the type's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by the type's update date.
required: false
schema:
type: object
description: Filter by the type's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by the type's deletion date.
required: false
schema:
type: object
description: Filter by the type'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`).
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/product-types' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Types
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTypeListResponse'
'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: PostProductTypes
summary: Create Product Type
description: Create a product type.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateProduct'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/product-types' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"value": "{value}",
"metadata": {}
}'
tags:
- Product Types
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTypeResponse'
'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: createProductTypesWorkflow
/admin/product-types/{id}:
get:
operationId: GetProductTypesId
summary: Get a Product Type
description: Retrieve a product type by its ID. You can expand the product type's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The product type's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/product-types/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Types
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTypeResponse'
'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: PostProductTypesId
summary: Update a Product Type
description: Update a product type's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The product type's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- metadata
properties:
value:
type: string
title: value
description: The product type's value.
metadata:
type: object
description: The product type's metadata.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/product-types/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"metadata": {}
}'
tags:
- Product Types
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTypeResponse'
'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: updateProductTypesWorkflow
delete:
operationId: DeleteProductTypesId
summary: Delete a Product Type
description: Delete a product type. This doesn't delete products of this type.
x-authenticated: true
parameters:
- name: id
in: path
description: The product type's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/product-types/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Types
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductTypeDeleteResponse'
'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: deleteProductTypesWorkflow
/admin/product-variants:
get:
operationId: GetProductVariants
summary: List Product Variants
description: Retrieve a list of product variants. The product variants can be filtered by fields such as `id`. The product variants can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 variant's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the product variant's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a variant's ID.
- type: array
description: Filter by variant IDs.
items:
type: string
title: id
description: A variant's ID.
- name: manage_inventory
in: query
description: Filter by whether a variant's `manage_inventory` is enabled.
required: false
schema:
type: boolean
title: manage_inventory
description: Filter by whether a variant's `manage_inventory` is enabled.
- name: allow_backorder
in: query
description: Filter by whether backorder is allowed for a variant.
required: false
schema:
type: boolean
title: allow_backorder
description: Filter by whether backorder is allowed for a variant.
- name: created_at
in: query
description: Filter by the product variant's creation date.
required: false
schema:
type: object
description: Filter by the product variant's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by the product variant's update date.
required: false
schema:
type: object
description: Filter by the product variant's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by the product variant's deletion date.
required: false
schema:
type: object
description: Filter by the product variant'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`).
- name: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/product-variants' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Product Variants
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The product variant's limit.
offset:
type: number
title: offset
description: The product variant's offset.
count:
type: number
title: count
description: The product variant's count.
- type: object
description: SUMMARY
required:
- variants
properties:
variants:
type: array
description: The product variant's variants.
items:
$ref: '#/components/schemas/AdminProductVariant'
'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'
/admin/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: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: price_list_id
in: query
required: false
schema:
oneOf:
- type: string
title: price_list_id
description: Filter by a price list's ID to retrieve its associated products.
- type: array
description: The product's price list id.
items:
type: string
title: price_list_id
description: Filter by a price list IDs to retrieve their associated products.
- name: q
in: query
description: Search term to filter a product's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter a product's searchable properties.
- name: status
in: query
required: false
schema:
oneOf:
- type: string
title: status
description: Filter by a product status.
- type: array
description: Filter by product statuses.
items:
type: string
enum:
- draft
- proposed
- published
- rejected
- name: sales_channel_id
in: query
required: false
schema:
oneOf:
- type: string
title: sales_channel_id
description: Filter by a sales channel's ID to retrieve its associated products.
- type: array
description: Filter by sales channel IDs to retrieve their associated products.
items:
type: string
title: sales_channel_id
description: A sales channel's ID.
- name: title
in: query
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 product title.
- name: handle
in: query
required: false
schema:
oneOf:
- type: string
title: handle
description: Filter by a handle.
- type: array
description: Filter by handles.
items:
type: string
title: handle
description: A product handle.
- 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's ID.
- name: is_giftcard
in: query
description: Filter by whether a product is a gift card.
required: false
schema:
type: boolean
title: is_giftcard
description: Filter by whether a product is a gift card.
- name: tags
in: query
description: Filter by associated tags to retrieve their products.
required: false
schema:
description: Filter by associated tags to retrieve their products.
properties:
value:
type: array
description: Filter by tag values.
items:
type: string
title: value
description: A tag's value.
- name: type_id
in: query
required: false
schema:
oneOf:
- type: string
title: type_id
description: Filter by a product type's ID to retrieve its associated products.
- type: array
description: Filter by product type IDs to retrieve their associated products.
items:
type: string
title: type_id
description: A product type's ID.
- name: category_id
in: query
required: false
schema:
oneOf:
- type: string
title: category_id
description: Filter by a product category's ID to retrieve its associated products.
- type: array
description: Filter by product category IDs to retrieve their associated products.
items:
type: string
title: category_id
description: A product category's ID.
- name: created_at
in: query
description: Filter by a product's creation date.
required: false
schema:
type: object
description: Filter by a 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 an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a product's update date.
required: false
schema:
type: object
description: Filter by a 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 an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a product's deletion date.
required: false
schema:
type: object
description: Filter by a product'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`).
- 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: collection_id
in: query
required: false
schema:
oneOf:
- type: string
title: collection_id
description: Filter by a product collection ID.
- type: array
description: Filter by product collection IDs.
items:
type: string
title: collection_id
description: A product collection's ID.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/products' \
-H 'x-medusa-access-token: {api_token}'
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'
post:
operationId: PostProducts
summary: Create Product
description: Create a product.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/AdminCreateProduct'
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "{value}"
}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductResponse'
'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: createProductsWorkflow
/admin/products/batch:
post:
operationId: PostProductsBatch
summary: Create Product
description: Create a product.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminBatchProductRequest'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminBatchProductResponse'
'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: batchProductsWorkflow
/admin/products/export:
post:
operationId: PostProductsExport
summary: Create Product
description: Create a product.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExportProductRequest'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/export' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'202':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminExportProductResponse'
'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: exportProductsWorkflow
/admin/products/import:
post:
operationId: PostProductsImport
summary: Create Product
description: Create a product.
x-authenticated: true
parameters: []
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminImportProductRequest'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/import' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'202':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminImportProductResponse'
'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: importProductsWorkflow
/admin/products/import/{transaction_id}/confirm:
post:
operationId: PostProductsImportTransaction_idConfirm
summary: Add Confirms to Product
description: Add a list of confirms to a product.
x-authenticated: true
parameters:
- name: transaction_id
in: path
description: The product's transaction id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/import/{transaction_id}/confirm' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'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'
requestBody:
content:
application/json:
schema: {}
x-workflow: importProductsWorkflowId
/admin/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: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/products/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductResponse'
'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: PostProductsId
summary: Update a Product
description: Update a product's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/AdminUpdateProduct'
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductResponse'
'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: updateProductsWorkflow
delete:
operationId: DeleteProductsId
summary: Delete a Product
description: Delete a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/products/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductDeleteResponse'
'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: deleteProductsWorkflow
/admin/products/{id}/options:
get:
operationId: GetProductsIdOptions
summary: List a Product's Options
x-sidebar-summary: List Options
description: Retrieve a list of options of a product. The options can be filtered by fields like `id`. The options can also be paginated.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 option's searchable fields.
required: false
schema:
type: string
title: q
description: Search term to filter the product option's searchable fields.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by the product option's ID.
- type: array
description: Filter by product option IDs.
items:
type: string
title: id
description: A product option's ID.
- name: title
in: query
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: An option's title.
- name: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/products/{id}/options' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of product options.
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 the returned items.
count:
type: number
title: count
description: The total number of items.
- type: object
description: The paginated list of product options.
required:
- product_options
properties:
product_options:
type: array
description: The list of product options.
items:
$ref: '#/components/schemas/AdminProductOption'
'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: PostProductsIdOptions
summary: Add Options to Product
description: Add a list of options to a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/AdminCreateProductOption'
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}/options' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "{value}",
"values": [
"{value}"
]
}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductResponse'
'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: createProductOptionsWorkflow
/admin/products/{id}/options/{option_id}:
get:
operationId: GetProductsIdOptionsOption_id
summary: Get a Product's Option
x-sidebar-summary: Get Option
description: Retrieve a product's option by its ID.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: option_id
in: path
description: The product's option id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/products/{id}/options/{option_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductOptionResponse'
'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: PostProductsIdOptionsOption_id
summary: Add Options to Product
description: Add a list of options to a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: option_id
in: path
description: The product's option id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/AdminUpdateProductOption'
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}/options/{option_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductResponse'
'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: updateProductOptionsWorkflow
delete:
operationId: DeleteProductsIdOptionsOption_id
summary: Delete an Option from Product
x-sidebar-summary: Delete Option
description: |
Delete an option from a product.
Values of this option in the product's variants are removed.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: option_id
in: path
description: The product option's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/products/{id}/options/{option_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductOptionDeleteResponse'
'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: deleteProductOptionsWorkflow
/admin/products/{id}/variants:
get:
operationId: GetProductsIdVariants
summary: List Variants of a Product
x-sidebar-summary: List Variants
description: Retrieve a list of variants in a product. The variants can be filtered by fields like FILTER FIELDS. The variants can also be paginated.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 variant's search attributes.
required: false
schema:
type: string
title: q
description: Search term to filter the variant's search attributes.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a variant's ID.
- type: array
description: Filter by variant IDs.
items:
type: string
title: id
description: A variant ID.
- name: manage_inventory
in: query
description: Filter by whether a variant's `manage_inventory` property is enabled.
required: false
schema:
type: boolean
title: manage_inventory
description: Filter by whether a variant's `manage_inventory` property is enabled.
- name: allow_backorder
in: query
description: Filter by whether backorders are allowed for the variant.
required: false
schema:
type: boolean
title: allow_backorder
description: Filter by whether backorders are allowed for the variant.
- 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 an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by 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 an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by the product's deletion date.
required: false
schema:
type: object
description: Filter by the product'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`).
- name: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/products/{id}/variants' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of product variants.
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The maximum number of returned items.
offset:
type: number
title: offset
description: The number of items skipped before the returned item.
count:
type: number
title: count
description: The total number of items.
- type: object
description: The paginated list of product variants.
required:
- variants
properties:
variants:
type: array
description: The list of product variants.
items:
$ref: '#/components/schemas/AdminProductVariant'
'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: PostProductsIdVariants
summary: Add Variants to Product
description: Add a list of variants to a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/AdminCreateProductVariant'
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}/variants' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "{value}",
"prices": []
}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductResponse'
'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: createProductVariantsWorkflow
/admin/products/{id}/variants/batch:
post:
operationId: PostProductsIdVariantsBatch
summary: Add Variants to Product
description: Add a list of variants to a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminBatchProductVariantRequest'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}/variants/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminBatchProductVariantResponse'
'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: batchProductVariantsWorkflow
/admin/products/{id}/variants/inventory-items/batch:
post:
operationId: PostProductsIdVariantsInventoryItemsBatch
summary: Add Inventory Items to Product
description: Add a list of inventory items to a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
create:
type: array
description: The product's create.
items:
type: object
description: The create's details.
required:
- required_quantity
- inventory_item_id
- variant_id
properties:
required_quantity:
type: number
title: required_quantity
description: The create's required quantity.
inventory_item_id:
type: string
title: inventory_item_id
description: The create's inventory item id.
variant_id:
type: string
title: variant_id
description: The create's variant id.
update:
type: array
description: The product's update.
items:
type: object
description: The update's details.
required:
- required_quantity
- inventory_item_id
- variant_id
properties:
required_quantity:
type: number
title: required_quantity
description: The update's required quantity.
inventory_item_id:
type: string
title: inventory_item_id
description: The update's inventory item id.
variant_id:
type: string
title: variant_id
description: The update's variant id.
delete:
type: array
description: The product's delete.
items:
type: object
description: The delete's details.
required:
- inventory_item_id
- variant_id
properties:
inventory_item_id:
type: string
title: inventory_item_id
description: The delete's inventory item id.
variant_id:
type: string
title: variant_id
description: The delete's variant id.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}/variants/inventory-items/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductVariantInventoryBatchResponse'
'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: batchLinksWorkflow
/admin/products/{id}/variants/{variant_id}:
get:
operationId: GetProductsIdVariantsVariant_id
summary: Get Variant of a Product
x-sidebar-summary: Get Variant
description: Retrieve a product's variant by its ID.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: variant_id
in: path
description: The variant's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/products/{id}/variants/{variant_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductVariantResponse'
'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: PostProductsIdVariantsVariant_id
summary: Add Variants to Product
description: Add a list of variants to a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: variant_id
in: path
description: The product's variant id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/AdminUpdateProductVariant'
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductResponse'
'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: updateProductVariantsWorkflow
delete:
operationId: DeleteProductsIdVariantsVariant_id
summary: Delete Product Variant
x-sidebar-summary: Delete Variant
description: Delete a variant of a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: variant_id
in: path
description: The product variant's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/products/{id}/variants/{variant_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductVariantDeleteResponse'
'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: deleteProductVariantsWorkflow
/admin/products/{id}/variants/{variant_id}/inventory-items:
post:
operationId: PostProductsIdVariantsVariant_idInventoryItems
summary: Add Inventory Items to Product
description: Add a list of inventory items to a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: variant_id
in: path
description: The product's variant id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateVariantInventoryItem'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}/inventory-items' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"required_quantity": 7390879820021760,
"inventory_item_id": "{value}"
}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductVariantResponse'
'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: createLinksWorkflow
/admin/products/{id}/variants/{variant_id}/inventory-items/{inventory_item_id}:
post:
operationId: PostProductsIdVariantsVariant_idInventoryItemsInventory_item_id
summary: Add Inventory Items to Product
description: Add a list of inventory items to a product.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: variant_id
in: path
description: The product's variant id.
required: true
schema:
type: string
- name: inventory_item_id
in: path
description: The product's inventory item id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateVariantInventoryItem'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}/inventory-items/{inventory_item_id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"required_quantity": 5324804697620480
}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductVariantResponse'
'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: updateLinksWorkflow
delete:
operationId: DeleteProductsIdVariantsVariant_idInventoryItemsInventory_item_id
summary: Remove Inventory Item Association with Product Variant
x-sidebar-summary: Remove Inventory Item
description: Remove the association between an inventory item and its product variant.
x-authenticated: true
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: variant_id
in: path
description: The products variant's ID.
required: true
schema:
type: string
- name: inventory_item_id
in: path
description: The inventory item's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/products/{id}/variants/{variant_id}/inventory-items/{inventory_item_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminProductVariantInventoryLinkDeleteResponse'
'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: dismissLinksWorkflow
/admin/promotions:
get:
operationId: GetPromotions
summary: List Promotions
description: Retrieve a list of promotions. The promotions can be filtered by fields such as `id`. The promotions can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 promotion's searchable attributes.
required: false
schema:
type: string
title: q
description: Search term to filter the promotion's searchable attributes.
- name: code
in: query
required: false
schema:
oneOf:
- type: string
title: code
description: Filter by a promotion code.
- type: array
description: Filter by promotion codes.
items:
type: string
title: code
description: A promotion code.
- name: campaign_id
in: query
required: false
schema:
oneOf:
- type: string
title: campaign_id
description: Filter by a campaign's ID to retrieve its associated promotions.
- type: array
description: Filter by campaign IDs to retrieve their associated promotions.
items:
type: string
title: campaign_id
description: A campaign's ID.
- name: application_method
in: query
description: Apply filters on the application methods to retrieve the promotions of the matching application methods.
required: false
schema:
type: object
description: Apply filters on the application methods to retrieve the promotions of the matching application methods.
properties:
currency_code:
oneOf:
- type: string
title: currency_code
description: Filter by a currency code.
- type: array
description: Filter by currency codes.
items:
type: string
title: currency_code
description: A currency code.
- name: created_at
in: query
description: Filter by a promotion's creation date.
required: false
schema:
type: object
description: Filter by a promotion's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a promotion's update date.
required: false
schema:
type: object
description: Filter by a promotion's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a promotion's deletion date.
required: false
schema:
type: object
description: Filter by a promotion'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`).
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/promotions' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of promotions.
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 promotions.
required:
- promotions
properties:
promotions:
type: array
description: The list of promotions.
items:
$ref: '#/components/schemas/AdminPromotion'
'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: PostPromotions
summary: Create Promotion
description: Create a promotion.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- code
- type
- campaign_id
- application_method
properties:
code:
type: string
title: code
description: The promotion's code.
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
type:
type: string
enum:
- standard
- buyget
campaign_id:
type: string
title: campaign_id
description: The promotion's campaign id.
campaign:
type: object
description: The promotion's campaign.
required:
- name
- campaign_identifier
- description
- budget
- starts_at
- ends_at
properties:
name:
type: string
title: name
description: The campaign's name.
campaign_identifier:
type: string
title: campaign_identifier
description: The campaign's campaign identifier.
description:
type: string
title: description
description: The campaign's description.
budget:
type: object
description: The campaign's budget.
required:
- type
- limit
- currency_code
properties:
type:
type: string
enum:
- spend
- usage
limit:
type: number
title: limit
description: The budget's limit.
currency_code:
type: string
title: currency_code
description: The budget's currency code.
starts_at:
type: string
title: starts_at
description: The campaign's starts at.
format: date-time
ends_at:
type: string
title: ends_at
description: The campaign's ends at.
format: date-time
promotions:
type: array
description: The campaign's promotions.
items:
type: object
description: The promotion's promotions.
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
application_method:
type: object
description: The promotion's application method.
required:
- description
- value
- currency_code
- max_quantity
- type
- target_type
- apply_to_quantity
- buy_rules_min_quantity
properties:
description:
type: string
title: description
description: The application method's description.
value:
type: number
title: value
description: The application method's value.
currency_code:
type: string
title: currency_code
description: The application method's currency code.
max_quantity:
type: number
title: max_quantity
description: The application method's max quantity.
type:
type: string
enum:
- fixed
- percentage
target_type:
type: string
enum:
- order
- shipping_methods
- items
allocation:
type: string
enum:
- each
- across
target_rules:
type: array
description: The application method's target rules.
items:
type: object
description: The target rule's target rules.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
enum:
- gte
- lte
- gt
- lt
- eq
- ne
- in
description:
type: string
title: description
description: The target rule's description.
attribute:
type: string
title: attribute
description: The target rule's attribute.
values:
oneOf:
- type: string
title: values
description: The target rule's values.
- type: array
description: The target rule's values.
items:
type: string
title: values
description: The value's values.
buy_rules:
type: array
description: The application method's buy rules.
items:
type: object
description: The buy rule's buy rules.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
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 buy rule's attribute.
values:
oneOf:
- type: string
title: values
description: The buy rule's values.
- type: array
description: The buy rule's values.
items:
type: string
title: values
description: The value's values.
apply_to_quantity:
type: number
title: apply_to_quantity
description: The application method's apply to quantity.
buy_rules_min_quantity:
type: number
title: buy_rules_min_quantity
description: The application method's buy rules min quantity.
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
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 rule's attribute.
values:
oneOf:
- type: string
title: values
description: The rule's values.
- type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/promotions' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"code": "{value}",
"type": "{value}",
"campaign_id": "{value}",
"application_method": {
"description": "{value}",
"value": 1841223411171328,
"currency_code": "{value}",
"max_quantity": 2960098049654784,
"type": "{value}",
"target_type": "{value}",
"allocation": "{value}",
"target_rules": [],
"buy_rules": [],
"apply_to_quantity": 708643867590656,
"buy_rules_min_quantity": 3167972149428224
}
}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPromotionResponse'
'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: createPromotionsWorkflow
/admin/promotions/rule-attribute-options/{rule_type}:
get:
operationId: GetPromotionsRuleAttributeOptionsRule_type
summary: List Rule Attribute Options of a Rule Type
x-sidebar-summary: List Rule Attribute Options
description: |
Retrieve a list of attributes for the promotion and application method types specified in the query parameters.
Only the attributes of the rule type specified in the path parameter are retrieved:
- If `rule_type` is `rules`, the attributes of the promotion's type are retrieved. - If `rule_type` is `target-rules`, the target rules' attributes of the application method's type are retrieved. - If `rule_type` is `buy-rules`, the buy rules' attributes of the application method's type are retrieved.
x-authenticated: true
parameters:
- name: rule_type
in: path
description: The rule type.
required: true
schema:
type: string
enum:
- rules
- target-rules
- buy-rules
- name: promotion_type
in: query
description: The promotion type to retrieve rules for.
required: false
schema:
type: string
title: promotion_type
description: The promotion type to retrieve rules for.
enum:
- standard
- buyget
- name: application_method_type
in: query
description: The application method type to retrieve rules for.
required: false
schema:
type: string
title: application_method_type
description: The application method type to retrieve rules for.
enum:
- fixed
- percentage
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/promotions/rule-attribute-options/{rule_type}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: The list of attributes.
required:
- attributes
properties:
attributes:
type: array
description: The list of attributes.
items:
$ref: '#/components/schemas/AdminRuleAttributeOption'
'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'
/admin/promotions/rule-value-options/{rule_type}/{rule_attribute_id}:
get:
operationId: GetPromotionsRuleValueOptionsRule_typeRule_attribute_id
summary: List Rule Values Given a Rule Attribute
x-sidebar-summary: List Rule Values
description: |
Retrieve all potential values for promotion rules and target and buy rules based on the specified rule attribute and type.
For example, if you provide the ID of the `currency_code` rule attribute, and set `rule_type` to `rules`, a list of currencies are retrieved in label-value pairs.
x-authenticated: true
parameters:
- name: rule_type
in: path
description: The rule type.
required: true
schema:
type: string
enum:
- rules
- target-rules
- buy-rules
- name: rule_attribute_id
in: path
description: The rule attribute's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: promotion_type
in: query
description: The promotion type to retrieve rules for.
required: false
schema:
type: string
title: promotion_type
description: The promotion type to retrieve rules for.
enum:
- standard
- buyget
- name: application_method_type
in: query
description: The application method type to retrieve rules for.
required: false
schema:
type: string
title: application_method_type
description: The application method type to retrieve rules for.
enum:
- fixed
- percentage
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/promotions/rule-value-options/{rule_type}/{rule_attribute_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: The list of rule values.
required:
- values
properties:
values:
type: array
description: The list of rule values.
items:
$ref: '#/components/schemas/AdminRuleValueOption'
'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'
/admin/promotions/{id}:
get:
operationId: GetPromotionsId
summary: Get a Promotion
description: Retrieve a promotion by its ID. You can expand the promotion's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The promotion's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/promotions/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPromotionResponse'
'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: PostPromotionsId
summary: Update a Promotion
description: Update a promotion's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The promotion's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- campaign_id
properties:
code:
type: string
title: code
description: The promotion's code.
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
type:
type: string
enum:
- standard
- buyget
campaign_id:
type: string
title: campaign_id
description: The promotion's campaign id.
campaign:
type: object
description: The promotion's campaign.
required:
- name
- campaign_identifier
- description
- budget
- starts_at
- ends_at
properties:
name:
type: string
title: name
description: The campaign's name.
campaign_identifier:
type: string
title: campaign_identifier
description: The campaign's campaign identifier.
description:
type: string
title: description
description: The campaign's description.
budget:
type: object
description: The campaign's budget.
required:
- type
- limit
- currency_code
properties:
type:
type: string
enum:
- spend
- usage
limit:
type: number
title: limit
description: The budget's limit.
currency_code:
type: string
title: currency_code
description: The budget's currency code.
starts_at:
type: string
title: starts_at
description: The campaign's starts at.
format: date-time
ends_at:
type: string
title: ends_at
description: The campaign's ends at.
format: date-time
promotions:
type: array
description: The campaign's promotions.
items:
type: object
description: The promotion's promotions.
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
application_method:
type: object
description: The promotion's application method.
required:
- description
- max_quantity
- currency_code
- apply_to_quantity
- buy_rules_min_quantity
properties:
description:
type: string
title: description
description: The application method's description.
value:
type: number
title: value
description: The application method's value.
max_quantity:
type: number
title: max_quantity
description: The application method's max quantity.
currency_code:
type: string
title: currency_code
description: The application method's currency code.
type:
type: string
enum:
- fixed
- percentage
target_type:
type: string
enum:
- order
- shipping_methods
- items
allocation:
type: string
enum:
- each
- across
target_rules:
type: array
description: The application method's target rules.
items:
type: object
description: The target rule's target rules.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
enum:
- gte
- lte
- gt
- lt
- eq
- ne
- in
description:
type: string
title: description
description: The target rule's description.
attribute:
type: string
title: attribute
description: The target rule's attribute.
values:
oneOf:
- type: string
title: values
description: The target rule's values.
- type: array
description: The target rule's values.
items:
type: string
title: values
description: The value's values.
buy_rules:
type: array
description: The application method's buy rules.
items:
type: object
description: The buy rule's buy rules.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
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 buy rule's attribute.
values:
oneOf:
- type: string
title: values
description: The buy rule's values.
- type: array
description: The buy rule's values.
items:
type: string
title: values
description: The value's values.
apply_to_quantity:
type: number
title: apply_to_quantity
description: The application method's apply to quantity.
buy_rules_min_quantity:
type: number
title: buy_rules_min_quantity
description: The application method's buy rules min quantity.
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
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 rule's attribute.
values:
oneOf:
- type: string
title: values
description: The rule's values.
- type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
- type: object
description: SUMMARY
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: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/promotions/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"campaign_id": "{value}"
}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPromotionResponse'
'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: updatePromotionsWorkflow
delete:
operationId: DeletePromotionsId
summary: Delete a Promotion
description: Delete a promotion.
x-authenticated: true
parameters:
- name: id
in: path
description: The promotion's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/promotions/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The promotion's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: promotion
deleted:
type: boolean
title: deleted
description: Whether the promotion was deleted.
'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: deletePromotionsWorkflow
/admin/promotions/{id}/buy-rules/batch:
post:
operationId: PostPromotionsIdBuyRulesBatch
summary: Add Buy Rules to Promotion
description: Add a list of buy rules to a promotion.
x-authenticated: true
parameters:
- name: id
in: path
description: The promotion's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
create:
type: array
description: The promotion's create.
items:
type: object
description: The create's details.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
enum:
- gte
- lte
- gt
- lt
- eq
- ne
- in
description:
type: string
title: description
description: The create's description.
attribute:
type: string
title: attribute
description: The create's attribute.
values:
oneOf:
- type: string
title: values
description: The create's values.
- type: array
description: The create's values.
items:
type: string
title: values
description: The value's values.
update:
type: array
description: The promotion's update.
items:
type: object
description: The update's details.
required:
- id
- description
- values
properties:
id:
type: string
title: id
description: The update's ID.
operator:
type: string
enum:
- gte
- lte
- gt
- lt
- eq
- ne
- in
description:
type: string
title: description
description: The update's description.
attribute:
type: string
title: attribute
description: The update's attribute.
values:
oneOf:
- type: string
title: values
description: The update's values.
- type: array
description: The update's values.
items:
type: string
title: values
description: The value's values.
delete:
type: array
description: The promotion's delete.
items:
type: string
title: delete
description: The delete's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/promotions/{id}/buy-rules/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- created
- updated
- deleted
properties:
created:
type: array
description: The promotion's created.
items:
$ref: '#/components/schemas/AdminPromotionRule'
updated:
type: array
description: The promotion's updated.
items:
$ref: '#/components/schemas/AdminPromotionRule'
deleted:
type: object
description: The promotion's deleted.
required:
- ids
- object
- deleted
properties:
ids:
type: array
description: The deleted's ids.
items:
type: string
title: ids
description: The id's ids.
object:
type: string
title: object
description: The deleted's object.
deleted:
type: boolean
title: deleted
description: The deleted'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: batchPromotionRulesWorkflow
/admin/promotions/{id}/rules/batch:
post:
operationId: PostPromotionsIdRulesBatch
summary: Add Rules to Promotion
description: Add a list of rules to a promotion.
x-authenticated: true
parameters:
- name: id
in: path
description: The promotion's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
create:
type: array
description: The promotion's create.
items:
type: object
description: The create's details.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
enum:
- gte
- lte
- gt
- lt
- eq
- ne
- in
description:
type: string
title: description
description: The create's description.
attribute:
type: string
title: attribute
description: The create's attribute.
values:
oneOf:
- type: string
title: values
description: The create's values.
- type: array
description: The create's values.
items:
type: string
title: values
description: The value's values.
update:
type: array
description: The promotion's update.
items:
type: object
description: The update's details.
required:
- id
- description
- values
properties:
id:
type: string
title: id
description: The update's ID.
operator:
type: string
enum:
- gte
- lte
- gt
- lt
- eq
- ne
- in
description:
type: string
title: description
description: The update's description.
attribute:
type: string
title: attribute
description: The update's attribute.
values:
oneOf:
- type: string
title: values
description: The update's values.
- type: array
description: The update's values.
items:
type: string
title: values
description: The value's values.
delete:
type: array
description: The promotion's delete.
items:
type: string
title: delete
description: The delete's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/promotions/{id}/rules/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- created
- updated
- deleted
properties:
created:
type: array
description: The promotion's created.
items:
$ref: '#/components/schemas/AdminPromotionRule'
updated:
type: array
description: The promotion's updated.
items:
$ref: '#/components/schemas/AdminPromotionRule'
deleted:
type: object
description: The promotion's deleted.
required:
- ids
- object
- deleted
properties:
ids:
type: array
description: The deleted's ids.
items:
type: string
title: ids
description: The id's ids.
object:
type: string
title: object
description: The deleted's object.
deleted:
type: boolean
title: deleted
description: The deleted'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: batchPromotionRulesWorkflow
/admin/promotions/{id}/target-rules/batch:
post:
operationId: PostPromotionsIdTargetRulesBatch
summary: Add Target Rules to Promotion
description: Add a list of target rules to a promotion.
x-authenticated: true
parameters:
- name: id
in: path
description: The promotion's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
create:
type: array
description: The promotion's create.
items:
type: object
description: The create's details.
required:
- operator
- description
- attribute
- values
properties:
operator:
type: string
enum:
- gte
- lte
- gt
- lt
- eq
- ne
- in
description:
type: string
title: description
description: The create's description.
attribute:
type: string
title: attribute
description: The create's attribute.
values:
oneOf:
- type: string
title: values
description: The create's values.
- type: array
description: The create's values.
items:
type: string
title: values
description: The value's values.
update:
type: array
description: The promotion's update.
items:
type: object
description: The update's details.
required:
- id
- description
- values
properties:
id:
type: string
title: id
description: The update's ID.
operator:
type: string
enum:
- gte
- lte
- gt
- lt
- eq
- ne
- in
description:
type: string
title: description
description: The update's description.
attribute:
type: string
title: attribute
description: The update's attribute.
values:
oneOf:
- type: string
title: values
description: The update's values.
- type: array
description: The update's values.
items:
type: string
title: values
description: The value's values.
delete:
type: array
description: The promotion's delete.
items:
type: string
title: delete
description: The delete's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- created
- updated
- deleted
properties:
created:
type: array
description: The promotion's created.
items:
$ref: '#/components/schemas/AdminPromotionRule'
updated:
type: array
description: The promotion's updated.
items:
$ref: '#/components/schemas/AdminPromotionRule'
deleted:
type: object
description: The promotion's deleted.
required:
- ids
- object
- deleted
properties:
ids:
type: array
description: The deleted's ids.
items:
type: string
title: ids
description: The id's ids.
object:
type: string
title: object
description: The deleted's object.
deleted:
type: boolean
title: deleted
description: The deleted'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: batchPromotionRulesWorkflow
/admin/promotions/{id}/{rule_type}:
get:
operationId: GetPromotionsIdRule_type
summary: List Rules of a Promotion
x-sidebar-summary: List Rules
description: |
Retrieve a list of rules in a promotion. The type of rules retrieved depend on the value of the `rule_type` path parameter:
- If `rule_type` is `rules`, the promotion's rules are retrivied. - If `rule_type` is `target-rules`, the target rules of the promotion's application method are retrieved. - If `rule_type` is `buy-rules`, the buy rules of the promotion's application method are retrieved.
x-authenticated: true
parameters:
- name: id
in: path
description: The promotion's ID.
required: true
schema:
type: string
- name: rule_type
in: path
description: The type of rules to retrieve.
required: true
schema:
type: string
enum:
- rules
- target-rules
- buy-rules
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/promotions/{id}/{rule_type}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Promotions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: The list of promotion rules.
required:
- rules
properties:
rules:
type: array
description: The list of promotion rules.
items:
$ref: '#/components/schemas/AdminPromotionRule'
'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'
/admin/refund-reasons:
get:
operationId: GetRefundReasons
summary: List Refund Reasons
description: Retrieve a list of refund reasons. The refund reasons can be filtered by fields such as `id`. The refund reasons can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 a refund reason's ID.
- type: array
description: Filter by refund reason IDs.
items:
type: string
title: id
description: A refund reason ID.
- name: q
in: query
description: Search term to filter the refund reason's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the refund reason'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
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/refund-reasons' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Refund Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The refund reason's limit.
offset:
type: number
title: offset
description: The refund reason's offset.
count:
type: number
title: count
description: The refund reason's count.
- type: object
description: SUMMARY
required:
- refund_reasons
properties:
refund_reasons:
type: array
description: The refund reason's refund reasons.
items:
$ref: '#/components/schemas/AdminRefundReason'
'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: PostRefundReasons
summary: Create Refund Reason
description: Create a refund reason.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateRefundReason'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/refund-reasons' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"label": "{value}",
"description": "{value}"
}'
tags:
- Refund Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RefundReasonResponse'
'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: createRefundReasonsWorkflow
/admin/refund-reasons/{id}:
get:
operationId: GetRefundReasonsId
summary: Get a Refund Reason
description: Retrieve a refund reason by its ID. You can expand the refund reason's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The refund reason's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/refund-reasons/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Refund Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RefundReasonResponse'
'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: PostRefundReasonsId
summary: Update a Refund Reason
description: Update a refund reason's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The refund reason's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- description
properties:
label:
type: string
title: label
description: The refund reason's label.
description:
type: string
title: description
description: The refund reason's description.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/refund-reasons/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"description": "{value}"
}'
tags:
- Refund Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RefundReasonResponse'
'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: updateRefundReasonsWorkflow
delete:
operationId: DeleteRefundReasonsId
summary: Delete a Refund Reason
description: Delete a refund reason.
x-authenticated: true
parameters:
- name: id
in: path
description: The refund reason's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/refund-reasons/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Refund Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The refund reason's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: refund_reason
deleted:
type: boolean
title: deleted
description: Whether the refund reason was deleted.
'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: deleteReturnReasonsWorkflow
/admin/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: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: 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: name
in: query
required: false
schema:
oneOf:
- type: string
title: name
description: Filter by a region's name.
- type: array
description: Filter by region names.
items:
type: string
title: name
description: A region's name.
- name: created_at
in: query
description: Filter by a region's creation date.
required: false
schema:
type: object
description: Filter by a region's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a region's update date.
required: false
schema:
type: object
description: Filter by a region's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a region's deletion date.
required: false
schema:
type: object
description: Filter by a region'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`).
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/regions' \
-H 'x-medusa-access-token: {api_token}'
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/AdminRegion'
'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: PostRegions
summary: Create Region
description: Create a region.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateRegion'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/regions' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Heloise",
"currency_code": "{value}",
"metadata": {}
}'
tags:
- Regions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminRegionResponse'
'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: createRegionsWorkflow
/admin/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: true
parameters:
- name: id
in: path
description: The region's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/regions/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Regions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminRegionResponse'
'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: PostRegionsId
summary: Update a Region
description: Update a region's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The region's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- metadata
properties:
name:
type: string
title: name
description: The region's name.
currency_code:
type: string
title: currency_code
description: The region's currency code.
countries:
type: array
description: The region's countries.
items:
type: string
title: countries
description: The country's countries.
automatic_taxes:
type: boolean
title: automatic_taxes
description: The region's automatic taxes.
payment_providers:
type: array
description: The region's payment providers.
items:
type: string
title: payment_providers
description: The payment provider's payment providers.
metadata:
type: object
description: The region's metadata.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The region's is tax inclusive.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/regions/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"metadata": {}
}'
tags:
- Regions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminRegionResponse'
'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: updateRegionsWorkflow
delete:
operationId: DeleteRegionsId
summary: Delete a Region
description: Delete a region.
x-authenticated: true
parameters:
- name: id
in: path
description: The region's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/regions/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Regions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The region's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: region
deleted:
type: boolean
title: deleted
description: Whether the region was deleted.
'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: deleteRegionsWorkflow
/admin/reservations:
get:
operationId: GetReservations
summary: List Reservations
description: Retrieve a list of reservations. The reservations can be filtered by fields such as `id`. The reservations can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: location_id
in: query
required: false
schema:
oneOf:
- type: string
title: location_id
description: Filter by a location's ID to retrieve its associated reservations.
- type: array
description: Filter by location IDs to retrieve its associated reservations.
items:
type: string
title: location_id
description: A location ID.
- name: inventory_item_id
in: query
required: false
schema:
oneOf:
- type: string
title: inventory_item_id
description: Filter by an inventory item's ID to retrieve its associated reservations.
- type: array
description: Filter by inventory item IDs to retrieve its associated reservations.
items:
type: string
title: inventory_item_id
description: An inventory item ID
- name: line_item_id
in: query
required: false
schema:
oneOf:
- type: string
title: line_item_id
description: Filter by a line item's ID to retrieve its associated reservations.
- type: array
description: Filter by line item IDs to retrieve its associated reservations.
items:
type: string
title: line_item_id
description: A line item ID
- name: created_by
in: query
required: false
schema:
oneOf:
- type: string
title: created_by
description: Filter by the ID of a user to retrieve the reservations they created.
- type: array
description: Filter by user IDs to retrieve the reservations they created.
items:
type: string
title: created_by
description: A user's ID.
- name: description
in: query
required: false
schema:
oneOf:
- type: string
title: description
description: Filter by a reservation's description. This filter applies a full-text match. To search by keywords, use the `q` query parameter instead.
- type: object
description: Apply filters on the reservation's description.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: created_at
in: query
description: Filter by a reservation's creation date.
required: false
schema:
type: object
description: Filter by a reservation's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a reservation's update date.
required: false
schema:
type: object
description: Filter by a reservation's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a reservation's deletion date.
required: false
schema:
type: object
description: Filter by a reservation'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`).
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/reservations' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Reservations
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of reservations.
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 reservations.
required:
- reservations
properties:
reservations:
type: array
description: The list of reservations`.
items:
$ref: '#/components/schemas/ReservationResponse'
'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: PostReservations
summary: Create Reservation
description: Create a reservation.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateReservation'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/reservations' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"line_item_id": "{value}",
"location_id": "{value}",
"inventory_item_id": "{value}",
"quantity": 3268935814217728,
"description": "{value}",
"metadata": {}
}'
tags:
- Reservations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReservationResponse'
'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: createReservationsWorkflow
/admin/reservations/{id}:
get:
operationId: GetReservationsId
summary: Get a Reservation
description: Retrieve a reservation by its ID. You can expand the reservation's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The reservation's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/reservations/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Reservations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReservationResponse'
'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: PostReservationsId
summary: Update a Reservation
description: Update a reservation's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The reservation's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- description
- metadata
properties:
location_id:
type: string
title: location_id
description: The reservation's location id.
quantity:
type: number
title: quantity
description: The reservation's quantity.
description:
type: string
title: description
description: The reservation's description.
metadata:
type: object
description: The reservation's metadata.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/reservations/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"description": "{value}",
"metadata": {}
}'
tags:
- Reservations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReservationResponse'
'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: updateReservationsWorkflow
delete:
operationId: DeleteReservationsId
summary: Delete a Reservation
description: Delete a reservation.
x-authenticated: true
parameters:
- name: id
in: path
description: The reservation's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/reservations/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Reservations
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The reservation's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: reservation
deleted:
type: boolean
title: deleted
description: Whether the reservation was deleted.
'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: deleteReservationsWorkflow
/admin/return-reasons:
get:
operationId: GetReturnReasons
summary: List Return Reasons
description: Retrieve a list of return reasons. The return reasons can be filtered by fields such as `id`. The return reasons can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 return reason's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the return reason's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a return reason ID.
- type: array
description: Filter by return reason IDs.
items:
type: string
title: id
description: A return reason ID.
- name: value
in: query
required: false
schema:
oneOf:
- type: string
title: value
description: Filter by a return reason's value.
- type: array
description: Filter by return reason values.
items:
type: string
title: value
description: A return reason value.
- name: label
in: query
required: false
schema:
oneOf:
- type: string
title: label
description: Filter by a return reason's label.
- type: array
description: Filter by return reason labels.
items:
type: string
title: label
description: A return reason label.
- name: description
in: query
required: false
schema:
oneOf:
- type: string
title: description
description: Filter by a description. This filter looks for an exact match of the return reason's description. To search by a term or keywords, use the `q` query parameter instead.
- type: array
description: Filter by descriptions. This filter looks for an exact match of the return reason's description. To search by a term or keywords, use the `q` query parameter instead.
items:
type: string
title: description
description: A return reason's description.
- name: parent_return_reason_id
in: query
required: false
schema:
oneOf:
- type: string
title: parent_return_reason_id
description: Filter by a return reason's ID to retrieve its child return reasons.
- type: array
description: Filter by return reason IDs to retrieve their child return reasons.
items:
type: string
title: parent_return_reason_id
description: The return reason's ID.
- name: created_at
in: query
description: Filter by a return reason's creation date.
required: false
schema:
type: object
description: Filter by a return reason's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a return reason's update date.
required: false
schema:
type: object
description: Filter by a return reason's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a return reason's deletion date.
required: false
schema:
type: object
description: Filter by a return reason'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`).
- name: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/return-reasons' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Return Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnReasonListResponse'
'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: PostReturnReasons
summary: Create Return Reason
description: Create a return reason.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderReturnReason'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/return-reasons' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"value": "{value}",
"label": "{value}"
}'
tags:
- Return Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnReasonResponse'
'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: createReturnReasonsWorkflow
/admin/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: true
parameters:
- name: id
in: path
description: The return reason's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/return-reasons/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Return Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnReasonResponse'
'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: PostReturnReasonsId
summary: Update a Return Reason
description: Update a return reason's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The return reason's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateOrderReturnReason'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/return-reasons/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Return Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnReasonResponse'
'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: updateReturnReasonsWorkflow
delete:
operationId: DeleteReturnReasonsId
summary: Delete a Return Reason
description: Delete a return reason.
x-authenticated: true
parameters:
- name: id
in: path
description: The return reason's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/return-reasons/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Return Reasons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnReasonDeleteResponse'
'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: deleteReturnReasonsWorkflow
/admin/returns:
get:
operationId: GetReturns
summary: List Returns
description: Retrieve a list of returns. The returns can be filtered by fields such as `id`. The returns can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 a return's ID.
- type: array
description: Filter by return IDs.
items:
type: string
title: id
description: A return ID.
- name: status
in: query
required: false
schema:
oneOf:
- type: string
title: status
description: Filter by a return status.
- type: array
description: Filter by return statuses.
items:
type: string
title: status
description: A return status.
- 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: sales_channel_id
in: query
description: The return's sales channel id.
required: false
schema:
type: array
description: The return's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
- name: fulfillment_status
in: query
description: The return's fulfillment status.
required: false
schema:
type: array
description: The return's fulfillment status.
items:
type: string
description: The fulfillment status's details.
enum:
- canceled
- not_fulfilled
- partially_fulfilled
- fulfilled
- partially_shipped
- shipped
- partially_delivered
- delivered
- name: payment_status
in: query
description: The return's payment status.
required: false
schema:
type: array
description: The return's payment status.
items:
type: string
description: The payment status's details.
enum:
- canceled
- not_paid
- awaiting
- authorized
- partially_authorized
- captured
- partially_captured
- partially_refunded
- refunded
- requires_action
- name: region_id
in: query
description: The return's region id.
required: false
schema:
type: array
description: The return's region id.
items:
type: string
title: region_id
description: The region id's details.
- name: q
in: query
description: The return's q.
required: false
schema:
type: string
title: q
description: The return's q.
- name: created_at
in: query
description: The return's created at.
required: false
schema:
type: object
description: The return's created at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: The return's updated at.
required: false
schema:
type: object
description: The return's updated at.
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.
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`).
- 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`).
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/returns' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The return's limit.
offset:
type: number
title: offset
description: The return's offset.
count:
type: number
title: count
description: The return's count.
- type: object
description: SUMMARY
required:
- returns
properties:
returns:
type: array
description: The return's returns.
items:
$ref: '#/components/schemas/AdminReturn'
'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: PostReturns
summary: Create Return
description: Create a return.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "{value}",
"items": [
{
"id": "id_7DO5H2LbSN3p7IzB",
"quantity": 1357590174892032,
"reason_id": "{value}",
"note": "{value}"
}
],
"return_shipping": {
"option_id": "{value}",
"price": 5112171463704576
},
"internal_note": "{value}",
"location_id": "{value}"
}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderReturnResponse'
'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: beginReturnOrderWorkflow
/admin/returns/{id}:
get:
operationId: GetReturnsId
summary: Get a Return
description: Retrieve a return by its ID. You can expand the return's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/returns/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnResponse'
'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: PostReturnsId
summary: Update a Return
description: Update a return's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsReturnReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"metadata": {}
}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: updateReturnWorkflow
/admin/returns/{id}/cancel:
post:
operationId: PostReturnsIdCancel
summary: Add Cancels to Return
description: Add a list of cancels to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/cancel' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnResponse'
'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'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostCancelReturnReqSchema'
x-workflow: cancelReturnWorkflow
/admin/returns/{id}/dismiss-items:
post:
operationId: PostReturnsIdDismissItems
summary: Add Dismiss Items to Return
description: Add a list of dismiss items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsReceiveItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/dismiss-items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: dismissItemReturnRequestWorkflow
/admin/returns/{id}/dismiss-items/{action_id}:
post:
operationId: PostReturnsIdDismissItemsAction_id
summary: Add Dismiss Items to Return
description: Add a list of dismiss items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The return's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsDismissItemsActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/dismiss-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: updateReceiveItemReturnRequestWorkflow
delete:
operationId: DeleteReturnsIdDismissItemsAction_id
summary: Remove Damaged Item from Return
x-sidebar-summary: Remove Damaged Item
description: |
Remove a damaged item, whose quantity is to be dismissed, in the return by the ID of the item's `RECEIVE_DAMAGED_RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property. return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the damaged item's `RECEIVE_DAMAGED_RETURN_ITEM` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/returns/{id}/dismiss-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: removeItemReturnActionWorkflow
/admin/returns/{id}/receive:
post:
operationId: PostReturnsIdReceive
summary: Add Receives to Return
description: Add a list of receives to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReceiveReturnsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/receive' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"return_id": "{value}",
"items": [
{
"id": "id_qfy3t6cU7m8O5cJ5zs",
"quantity": 6429460591017984,
"reason_id": "{value}",
"note": "{value}"
}
],
"internal_note": "{value}"
}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrderReturnResponse'
'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: beginReceiveReturnWorkflow
delete:
operationId: DeleteReturnsIdReceive
summary: Cancel Return Receival
description: Cancel the receival process previously started, and hasn't been confirmed, of a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/returns/{id}/receive' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The return's ID.
object:
type: string
title: object
description: The name of the returned object.
default: return
deleted:
type: boolean
title: deleted
description: Whether the return was deleted.
'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: cancelReturnReceiveWorkflow
/admin/returns/{id}/receive-items:
post:
operationId: PostReturnsIdReceiveItems
summary: Add Receive Items to Return
description: Add a list of receive items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsReceiveItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/receive-items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: receiveItemReturnRequestWorkflow
/admin/returns/{id}/receive-items/{action_id}:
post:
operationId: PostReturnsIdReceiveItemsAction_id
summary: Add Receive Items to Return
description: Add a list of receive items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The return's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsReceiveItemsActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/receive-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: updateReceiveItemReturnRequestWorkflow
delete:
operationId: DeleteReturnsIdReceiveItemsAction_id
summary: Remove a Received Item from Return
x-sidebar-summary: Remove Received Item
description: |
Remove an item marked as received in the return by the ID of the item's `RECEIVE_RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property. return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the received item's `RECEIVE_RETURN_ITEM` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/returns/{id}/receive-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: removeItemReceiveReturnActionWorkflow
/admin/returns/{id}/receive/confirm:
post:
operationId: PostReturnsIdReceiveConfirm
summary: Add Confirms to Return
description: Add a list of confirms to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsConfirmRequestReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/receive/confirm' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: confirmReturnReceiveWorkflow
/admin/returns/{id}/request:
post:
operationId: PostReturnsIdRequest
summary: Add Requests to Return
description: Add a list of requests to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsConfirmRequestReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/request' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: confirmReturnRequestWorkflow
delete:
operationId: DeleteReturnsIdRequest
summary: Cancel Return Request
description: Cancel a requested return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/returns/{id}/request' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The return's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: return
deleted:
type: boolean
title: deleted
description: Whether the return was deleted.
'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: cancelReturnRequestWorkflow
/admin/returns/{id}/request-items:
post:
operationId: PostReturnsIdRequestItems
summary: Add Request Items to Return
description: Add a list of request items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsRequestItemsReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/request-items' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: requestItemReturnWorkflow
/admin/returns/{id}/request-items/{action_id}:
post:
operationId: PostReturnsIdRequestItemsAction_id
summary: Add Request Items to Return
description: Add a list of request items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The return's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsRequestItemsActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/request-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: updateRequestItemReturnWorkflow
delete:
operationId: DeleteReturnsIdRequestItemsAction_id
summary: Remove Item from Return
x-sidebar-summary: Remove Item
description: |
Remove an item in the return by the ID of the item's `RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property. return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the item's `RETURN_ITEM` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/returns/{id}/request-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: removeItemReturnActionWorkflow
/admin/returns/{id}/shipping-method:
post:
operationId: PostReturnsIdShippingMethod
summary: Add Shipping Methods to Return
description: Add a list of shipping methods to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsShippingReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/shipping-method' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipping_option_id": "{value}"
}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: createReturnShippingMethodWorkflow
/admin/returns/{id}/shipping-method/{action_id}:
post:
operationId: PostReturnsIdShippingMethodAction_id
summary: Add Shipping Methods to Return
description: Add a list of shipping methods to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The return's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminPostReturnsShippingActionReqSchema'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/returns/{id}/shipping-method/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: updateReturnShippingMethodWorkflow
delete:
operationId: DeleteReturnsIdShippingMethodAction_id
summary: Remove Shipping Method from Return
x-sidebar-summary: Remove Shipping Method
description: |
Remove a shipping method of the return by the ID of the item's `SHIPPING_ADD` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The ID of the shipping method's `SHIPPING_ADD` action.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/returns/{id}/shipping-method/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminReturnPreviewResponse'
'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: removeReturnShippingMethodWorkflow
/admin/sales-channels:
get:
operationId: GetSalesChannels
summary: List Sales Channels
description: Retrieve a list of sales channels. The sales channels can be filtered by fields such as `id`. The sales channels can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 sales channel's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the sales channel's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a sales channel ID.
- type: array
description: Filter by sales channel IDs.
items:
type: string
title: id
description: A sales channel ID.
- name: name
in: query
required: false
schema:
oneOf:
- type: string
title: name
description: Filter by a sales channel name.
- type: array
description: Filter by sales channel names.
items:
type: string
title: name
description: A sales channel name.
- name: description
in: query
description: The sales channel's description.
required: false
schema:
type: string
title: description
description: Filter by a description. This filter matches an entire description. To search by terms or keywords, use the `q` query parameter instead.
- name: is_disabled
in: query
description: Filter by whether the sales channel is disabled.
required: false
schema:
type: boolean
title: is_disabled
description: Filter by whether the sales channel is disabled.
- name: created_at
in: query
description: Filter by a sales channel's creation date.
required: false
schema:
type: object
description: Filter by a sales channel's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a sales channel's update date.
required: false
schema:
type: object
description: Filter by a sales channel's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a sales channel's deletion date.
required: false
schema:
type: object
description: Filter by a sales channel'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`).
- name: location_id
in: query
required: false
schema:
oneOf:
- type: string
title: location_id
description: Filter by a location ID to retrieve its associated sales channels.
- type: array
description: Filter by location IDs to retrieve their associated sales channels.
items:
type: string
title: location_id
description: A location ID.
- name: publishable_key_id
in: query
required: false
schema:
oneOf:
- type: string
title: publishable_key_id
description: Filter by a publishable API key's ID to retrieve its associated sales channels.
- type: array
description: Filter by publishable API key IDs to retrieve their associated sales channels.
items:
type: string
title: publishable_key_id
description: A publishable API key ID.
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/sales-channels' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Sales Channels
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of sales channels.
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 sales channels.
required:
- sales_channels
properties:
sales_channels:
type: array
description: The list of sales channels.
items:
$ref: '#/components/schemas/AdminSalesChannel'
'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: PostSalesChannels
summary: Create Sales Channel
description: Create a sales channel.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateSalesChannel'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/sales-channels' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Linnea",
"description": "{value}",
"metadata": {}
}'
tags:
- Sales Channels
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminSalesChannelResponse'
'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: createSalesChannelsWorkflow
/admin/sales-channels/{id}:
get:
operationId: GetSalesChannelsId
summary: Get a Sales Channel
description: Retrieve a sales channel by its ID. You can expand the sales channel's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The sales channel's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/sales-channels/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Sales Channels
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminSalesChannelResponse'
'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: PostSalesChannelsId
summary: Update a Sales Channel
description: Update a sales channel's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The sales channel's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateSalesChannel'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/sales-channels/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"description": "{value}",
"metadata": {}
}'
tags:
- Sales Channels
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminSalesChannelResponse'
'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: updateSalesChannelsWorkflow
delete:
operationId: DeleteSalesChannelsId
summary: Delete a Sales Channel
description: Delete a sales channel.
x-authenticated: true
parameters:
- name: id
in: path
description: The sales channel's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/sales-channels/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Sales Channels
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminSalesChannelDeleteResponse'
'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: deleteSalesChannelsWorkflow
/admin/sales-channels/{id}/products:
post:
operationId: PostSalesChannelsIdProducts
summary: Add Products to Sales Channel
description: Add a list of products to a sales channel.
x-authenticated: true
parameters:
- name: id
in: path
description: The sales channel's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The sales channel's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The sales channel's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/sales-channels/{id}/products' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Sales Channels
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminSalesChannelResponse'
'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: linkProductsToSalesChannelWorkflow
/admin/shipping-options:
get:
operationId: GetShippingOptions
summary: List Shipping Options
description: Retrieve a list of shipping options. The shipping options can be filtered by fields such as `id`. The shipping options can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 a shipping option ID.
- type: array
description: Filter by shipping option IDs.
items:
type: string
title: id
description: A shipping option's ID.
- name: q
in: query
description: Search term to filter the shipping option's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the shipping option's searchable properties.
- name: service_zone_id
in: query
required: false
schema:
oneOf:
- type: string
title: service_zone_id
description: Filter by a service zone's ID to retrieve its associated shipping options.
- type: array
description: Filter by service zone IDs to retrieve their associated shipping options.
items:
type: string
title: service_zone_id
description: A service zone ID.
- name: shipping_profile_id
in: query
required: false
schema:
oneOf:
- type: string
title: shipping_profile_id
description: Filter by a shipping profile's ID to retrieve its associated shipping options.
- type: array
description: Filter by shipping profile IDs to retrieve their associated shipping options.
items:
type: string
title: shipping_profile_id
description: A shipping profile ID.
- name: provider_id
in: query
required: false
schema:
oneOf:
- type: string
title: provider_id
description: Filter by a fulfillment provider's ID to retrieve its associated shipping options.
- type: array
description: Filter by fulfillment provider IDs to retrieve their associated shipping options.
items:
type: string
title: provider_id
description: A fulfillment provider ID.
- name: shipping_option_type_id
in: query
required: false
schema:
oneOf:
- type: string
title: shipping_option_type_id
description: Filter by a shipping option type's ID to retrieve its associated shipping options.
- type: array
description: Filter by shipping option type IDs to retrieve its associated shipping options.
items:
type: string
title: shipping_option_type_id
description: A shipping option type ID.
- name: created_at
in: query
description: Filter by a shipping option's creation date.
required: false
schema:
type: object
description: Filter by a shipping option's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a shipping option's update date.
required: false
schema:
type: object
description: Filter by a shipping option's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a shipping option's deletion date.
required: false
schema:
type: object
description: Filter by a shipping option'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`).
- name: stock_location_id
in: query
required: false
schema:
oneOf:
- type: string
title: stock_location_id
description: Filter by a location ID to retrieve its associated shipping option.
- type: array
description: Filter by location IDs to retrieve their associated shipping option.
items:
type: string
title: stock_location_id
description: A stock location's ID.
- name: is_return
in: query
description: The shipping option's is return.
required: false
schema:
type: boolean
title: is_return
description: The shipping option's is return.
- name: admin_only
in: query
description: The shipping option's admin only.
required: false
schema:
type: boolean
title: admin_only
description: The shipping option's admin only.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/shipping-options' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Shipping Options
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of shipping options.
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 shipping options.
required:
- shipping_options
properties:
shipping_options:
type: array
description: The list of shipping options.
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'
post:
operationId: PostShippingOptions
summary: Create Shipping Option
description: Create a shipping option.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/shipping-options' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Julie",
"service_zone_id": "{value}",
"shipping_profile_id": "{value}",
"price_type": "{value}",
"provider_id": "{value}",
"type": {
"label": "{value}",
"description": "{value}",
"code": "{value}"
},
"prices": []
}'
tags:
- Shipping Options
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminShippingOptionResponse'
'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: createShippingOptionsWorkflow
/admin/shipping-options/{id}:
post:
operationId: PostShippingOptionsId
summary: Update a Shipping Option
description: Update a shipping option's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The shipping option's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
name:
type: string
title: name
description: The shipping option's name.
data:
type: object
description: The shipping option's data.
price_type:
type: string
enum:
- calculated
- flat
provider_id:
type: string
title: provider_id
description: The shipping option's provider id.
shipping_profile_id:
type: string
title: shipping_profile_id
description: The shipping option's shipping profile id.
type:
type: object
description: The shipping option's type.
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.
prices:
type: array
description: The shipping option's prices.
items:
oneOf:
- type: object
description: The price's prices.
properties:
id:
type: string
title: id
description: The price's ID.
currency_code:
type: string
title: currency_code
description: The price's currency code.
amount:
type: number
title: amount
description: The price's amount.
- type: object
description: The price's prices.
properties:
id:
type: string
title: id
description: The price's ID.
region_id:
type: string
title: region_id
description: The price's region id.
amount:
type: number
title: amount
description: The price's amount.
rules:
type: array
description: The shipping option's rules.
items:
oneOf:
- type: object
description: The rule's rules.
required:
- operator
- attribute
- value
properties:
operator:
type: string
enum:
- in
- eq
- ne
- gt
- gte
- lt
- lte
- nin
attribute:
type: string
title: attribute
description: The rule's attribute.
value:
oneOf:
- type: string
title: value
description: The rule's value.
- type: array
description: The rule's value.
items:
type: string
title: value
description: The value's details.
- type: object
description: The rule's rules.
required:
- id
- operator
- attribute
- value
properties:
id:
type: string
title: id
description: The rule's ID.
operator:
type: string
enum:
- in
- eq
- ne
- gt
- gte
- lt
- lte
- nin
attribute:
type: string
title: attribute
description: The rule's attribute.
value:
oneOf:
- type: string
title: value
description: The rule's value.
- type: array
description: The rule's value.
items:
type: string
title: value
description: The value's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/shipping-options/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Shipping Options
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminShippingOptionResponse'
'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: updateShippingOptionsWorkflow
delete:
operationId: DeleteShippingOptionsId
summary: Delete a Shipping Option
description: Delete a shipping option.
x-authenticated: true
parameters:
- name: id
in: path
description: The shipping option's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/shipping-options/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Shipping Options
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminShippingOptionDeleteResponse'
'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: deleteShippingOptionsWorkflow
/admin/shipping-options/{id}/rules/batch:
post:
operationId: PostShippingOptionsIdRulesBatch
summary: Add Rules to Shipping Option
description: Add a list of rules to a shipping option.
x-authenticated: true
parameters:
- name: id
in: path
description: The shipping option's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
create:
type: array
description: The shipping option's create.
items:
type: object
description: The create's details.
required:
- operator
- attribute
- value
properties:
operator:
type: string
enum:
- in
- eq
- ne
- gt
- gte
- lt
- lte
- nin
attribute:
type: string
title: attribute
description: The create's attribute.
value:
oneOf:
- type: string
title: value
description: The create's value.
- type: array
description: The create's value.
items:
type: string
title: value
description: The value's details.
update:
type: array
description: The shipping option's update.
items:
type: object
description: The update's details.
required:
- id
- operator
- attribute
- value
properties:
id:
type: string
title: id
description: The update's ID.
operator:
type: string
enum:
- in
- eq
- ne
- gt
- gte
- lt
- lte
- nin
attribute:
type: string
title: attribute
description: The update's attribute.
value:
oneOf:
- type: string
title: value
description: The update's value.
- type: array
description: The update's value.
items:
type: string
title: value
description: The value's details.
delete:
type: array
description: The shipping option's delete.
items:
type: string
title: delete
description: The delete's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/shipping-options/{id}/rules/batch' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Shipping Options
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- created
- updated
- deleted
properties:
created:
type: array
description: The shipping option's created.
items:
$ref: '#/components/schemas/AdminShippingOptionRule'
updated:
type: array
description: The shipping option's updated.
items:
$ref: '#/components/schemas/AdminShippingOptionRule'
deleted:
type: object
description: The shipping option's deleted.
required:
- ids
- object
- deleted
properties:
ids:
type: array
description: The deleted's ids.
items:
type: string
title: ids
description: The id's ids.
object:
type: string
title: object
description: The deleted's object.
deleted:
type: boolean
title: deleted
description: The deleted'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: batchShippingOptionRulesWorkflow
/admin/shipping-profiles:
get:
operationId: GetShippingProfiles
summary: List Shipping Profiles
description: Retrieve a list of shipping profiles. The shipping profiles can be filtered by fields such as `id`. The shipping profiles can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 a shipping profile's ID.
- type: array
description: Filter by shipping profile IDs.
items:
type: string
title: id
description: A shipping profile ID.
- name: q
in: query
description: Search term to filter the shipping profile's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the shipping profile's searchable properties.
- name: type
in: query
description: Filter by a shipping profile's type.
required: false
schema:
type: string
title: type
description: Filter by a shipping profile's type.
- name: name
in: query
description: Filter by a shipping profile's name.
required: false
schema:
type: string
title: name
description: Filter by a shipping profile's name.
- name: created_at
in: query
description: Filter by a shipping profile's creation date.
required: false
schema:
type: object
description: Filter by a shipping profile's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a shipping profile's update date.
required: false
schema:
type: object
description: Filter by a shipping profile's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a shipping profile's deletion date.
required: false
schema:
type: object
description: Filter by a shipping profile'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`).
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/shipping-profiles' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Shipping Profiles
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of shipping profiles.
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 shipping profiles.
required:
- shipping_profiles
properties:
shipping_profiles:
type: array
description: The list of shipping profiles.
items:
$ref: '#/components/schemas/AdminShippingProfile'
'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: PostShippingProfiles
summary: Create Shipping Profile
description: Create a shipping profile.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateShippingProfile'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/shipping-profiles' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Percy",
"type": "{value}",
"metadata": {}
}'
tags:
- Shipping Profiles
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminShippingProfileResponse'
'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: createShippingProfilesWorkflow
/admin/shipping-profiles/{id}:
get:
operationId: GetShippingProfilesId
summary: Get a Shipping Profile
description: Retrieve a shipping profile by its ID. You can expand the shipping profile's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The shipping profile's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/shipping-profiles/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Shipping Profiles
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminShippingProfileResponse'
'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: PostShippingProfilesId
summary: Update a Shipping Profile
description: Update a shipping profile's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The shipping profile's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- metadata
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.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/shipping-profiles/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"metadata": {}
}'
tags:
- Shipping Profiles
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminShippingProfileResponse'
'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: updateShippingProfilesWorkflow
delete:
operationId: DeleteShippingProfilesId
summary: Delete a Shipping Profile
description: Delete a shipping profile.
x-authenticated: true
parameters:
- name: id
in: path
description: The shipping profile's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/shipping-profiles/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Shipping Profiles
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminShippingProfileDeleteResponse'
'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: deleteShippingProfileWorkflow
/admin/stock-locations:
get:
operationId: GetStockLocations
summary: List Stock Locations
description: Retrieve a list of stock locations. The stock locations can be filtered by fields such as `id`. The stock locations can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 stock location's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the stock location's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a stock location ID.
- type: array
description: Filter by stock location IDs.
items:
type: string
title: id
description: A stock location ID.
- name: name
in: query
required: false
schema:
oneOf:
- type: string
title: name
description: Filter by a stock location name.
- type: array
description: Filter by stock location names.
items:
type: string
title: name
description: A stock location name.
- name: address_id
in: query
required: false
schema:
oneOf:
- type: string
title: address_id
description: Filter by an address ID to retrieve its associated locations.
- type: array
description: Filter by address IDs to retrieve their associated locations.
items:
type: string
title: address_id
description: An address ID.
- name: sales_channel_id
in: query
required: false
schema:
oneOf:
- type: string
title: sales_channel_id
description: Filter by a sales channel ID to retrieve its associated locations.
- type: array
description: Filter by sales channel IDs to retrieve their associated locations.
items:
type: string
title: sales_channel_id
description: A sales channel ID
- name: created_at
in: query
description: Filter by a stock location's creation date.
required: false
schema:
type: object
description: Filter by a stock location's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a stock location's update date.
required: false
schema:
type: object
description: Filter by a stock location's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a stock location's deletion date.
required: false
schema:
type: object
description: Filter by a stock location'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`).
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/stock-locations' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Stock Locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStockLocationListResponse'
'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: PostStockLocations
summary: Create Stock Location
description: Create a stock location.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateStockLocation'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/stock-locations' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Maryam",
"address_id": "{value}",
"metadata": {}
}'
tags:
- Stock Locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStockLocationResponse'
'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: createStockLocationsWorkflow
/admin/stock-locations/{id}:
get:
operationId: GetStockLocationsId
summary: Get a Stock Location
description: Retrieve a stock location by its ID. You can expand the stock location's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The stock location's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/stock-locations/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Stock Locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStockLocationResponse'
'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: PostStockLocationsId
summary: Update a Stock Location
description: Update a stock location's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The stock location's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateStockLocation'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/stock-locations/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"address_id": "{value}",
"metadata": {}
}'
tags:
- Stock Locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStockLocationResponse'
'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: updateStockLocationsWorkflow
delete:
operationId: DeleteStockLocationsId
summary: Delete a Stock Location
description: Delete a stock location.
x-authenticated: true
parameters:
- name: id
in: path
description: The stock location's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/stock-locations/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Stock Locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStockLocationDeleteResponse'
'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: deleteStockLocationsWorkflow
/admin/stock-locations/{id}/fulfillment-providers:
post:
operationId: PostStockLocationsIdFulfillmentProviders
summary: Add Fulfillment Providers to Stock Location
description: Add a list of fulfillment providers to a stock location.
x-authenticated: true
parameters:
- name: id
in: path
description: The stock location's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The stock location's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The stock location's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/stock-locations/{id}/fulfillment-providers' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Stock Locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStockLocationResponse'
'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: batchLinksWorkflow
/admin/stock-locations/{id}/fulfillment-sets:
post:
operationId: PostStockLocationsIdFulfillmentSets
summary: Add Fulfillment Sets to Stock Location
description: Add a list of fulfillment sets to a stock location.
x-authenticated: true
parameters:
- name: id
in: path
description: The stock location's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- name
- type
properties:
name:
type: string
title: name
description: The stock location's name.
type:
type: string
title: type
description: The stock location's type.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/stock-locations/{id}/fulfillment-sets' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Helene",
"type": "{value}"
}'
tags:
- Stock Locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStockLocationResponse'
'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: createLocationFulfillmentSetWorkflow
/admin/stock-locations/{id}/sales-channels:
post:
operationId: PostStockLocationsIdSalesChannels
summary: Add Sales Channels to Stock Location
description: Add a list of sales channels to a stock location.
x-authenticated: true
parameters:
- name: id
in: path
description: The stock location's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
type: object
description: SUMMARY
properties:
add:
type: array
description: The stock location's add.
items:
type: string
title: add
description: The add's details.
remove:
type: array
description: The stock location's remove.
items:
type: string
title: remove
description: The remove's details.
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/stock-locations/{id}/sales-channels' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Stock Locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStockLocationResponse'
'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: linkSalesChannelsToStockLocationWorkflow
/admin/stores:
get:
operationId: GetStores
summary: List Stores
description: Retrieve a list of stores. The stores can be filtered by fields such as `id`. The stores can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 store's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter the store's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a store ID.
- type: array
description: Filter by store IDs.
items:
type: string
title: id
description: A store ID.
- name: name
in: query
required: false
schema:
oneOf:
- type: string
title: name
description: Filter by a store name.
- type: array
description: Filter by store names.
items:
type: string
title: name
description: A store name.
- 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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/stores' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Stores
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStoreListResponse'
'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'
/admin/stores/{id}:
get:
operationId: GetStoresId
summary: Get a Store
description: Retrieve a store by its ID. You can expand the store's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The store's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/stores/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Stores
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStoreResponse'
'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: PostStoresId
summary: Update a Store
description: Update a store's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The store's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateStore'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/stores/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Melvina",
"default_sales_channel_id": "{value}",
"default_region_id": "{value}",
"default_location_id": "{value}",
"metadata": {}
}'
tags:
- Stores
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStoreResponse'
'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: updateStoresWorkflow
/admin/tax-rates:
get:
operationId: GetTaxRates
summary: List Tax Rates
description: Retrieve a list of tax rates. The tax rates can be filtered by fields such as `id`. The tax rates can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 terms to filter the tax rate's searchable properties.
required: false
schema:
type: string
title: q
description: Search terms to filter the tax rate's searchable properties.
- name: tax_region_id
in: query
required: false
schema:
oneOf:
- type: string
title: tax_region_id
description: Filter by a tax region ID to retrieve its associated rates.
- type: array
description: Filter by tax region IDs to retrieve their associated rates.
items:
type: string
title: tax_region_id
description: A tax region ID.
- type: object
description: Apply filters on the tax region ID to retrieve the rates associated with the matching tax regions.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: is_default
in: query
required: false
description: Filter by whether the tax rate is a default in its tax region.
schema:
type: string
enum:
- 'true'
- 'false'
- name: created_at
in: query
description: Filter by a tax rate's creation date.
required: false
schema:
type: object
description: Filter by a tax rate's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a tax rate's update date.
required: false
schema:
type: object
description: Filter by a tax rate's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a tax rate's deletion date.
required: false
schema:
type: object
description: Filter by a tax rate'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`).
- 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: 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: service_zone_id
in: query
description: Filter by a service zone's ID to retrieve its associated tax rates.
required: false
schema:
type: string
title: service_zone_id
description: Filter by a service zone's ID to retrieve its associated tax rates.
- name: shipping_profile_id
in: query
description: Filter by a shipping profile's ID to retrieve its associated tax rates.
required: false
schema:
type: string
title: shipping_profile_id
description: Filter by a shipping profile's ID to retrieve its associated tax rates.
- name: provider_id
in: query
description: Filter by a fulfillment provider's ID to retrieve its associated tax rates.
required: false
schema:
type: string
title: provider_id
description: Filter by a fulfillment provider's ID to retrieve its associated tax rates.
- name: shipping_option_type_id
in: query
description: Filter by a shipping option type's ID to retrieve its associated tax rates.
required: false
schema:
type: string
title: shipping_option_type_id
description: Filter by a shipping option type's ID to retrieve its associated tax rates.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/tax-rates' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Tax Rates
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of tax rates.
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 tax rates.
required:
- tax_rates
properties:
tax_rates:
type: array
description: The tax rate's tax rates.
items:
$ref: '#/components/schemas/AdminTaxRate'
'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: PostTaxRates
summary: Create Tax Rate
description: Create a tax rate.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateTaxRate'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/tax-rates' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Kaylin",
"tax_region_id": "{value}",
"metadata": {}
}'
tags:
- Tax Rates
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTaxRateResponse'
'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: createTaxRatesWorkflow
/admin/tax-rates/{id}:
get:
operationId: GetTaxRatesId
summary: Get a Tax Rate
description: Retrieve a tax rate by its ID. You can expand the tax rate's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The tax rate's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/tax-rates/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Tax Rates
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTaxRateResponse'
'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: PostTaxRatesId
summary: Update a Tax Rate
description: Update a tax rate's details.
x-authenticated: true
parameters:
- name: id
in: path
description: The tax rate's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateTaxRate'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/tax-rates/{id}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"metadata": {}
}'
tags:
- Tax Rates
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTaxRateResponse'
'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: updateTaxRatesWorkflow
delete:
operationId: DeleteTaxRatesId
summary: Delete a Tax Rate
description: Delete a tax rate.
x-authenticated: true
parameters:
- name: id
in: path
description: The tax rate's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/tax-rates/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Tax Rates
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTaxRateDeleteResponse'
'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: deleteTaxRatesWorkflow
/admin/tax-rates/{id}/rules:
post:
operationId: PostTaxRatesIdRules
summary: Add Rules to Tax Rate
description: Add a list of rules to a tax rate.
x-authenticated: true
parameters:
- name: id
in: path
description: The tax rate's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateTaxRateRule'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/tax-rates/{id}/rules' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"reference": "{value}",
"reference_id": "{value}"
}'
tags:
- Tax Rates
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTaxRateResponse'
'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: createTaxRateRulesWorkflow
/admin/tax-rates/{id}/rules/{rule_id}:
delete:
operationId: DeleteTaxRatesIdRulesRule_id
summary: Remove Rule of Tax Rate
x-sidebar-summary: Remove Rule
description: Remove a tax rate's rule.
x-authenticated: true
parameters:
- name: id
in: path
description: The tax rate's ID.
required: true
schema:
type: string
- name: rule_id
in: path
description: The tax rate rule's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/tax-rates/{id}/rules/{rule_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Tax Rates
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: SUMMARY
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.
deleted:
type: boolean
title: deleted
description: Whether the Tax Rate was deleted.
- type: object
description: SUMMARY
properties:
parent:
$ref: '#/components/schemas/AdminTaxRate'
description: SUMMARY
'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: deleteTaxRateRulesWorkflow
/admin/tax-regions:
get:
operationId: GetTaxRegions
summary: List Tax Regions
description: Retrieve a list of tax regions. The tax regions can be filtered by fields such as `id`. The tax regions can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 a tax region's searchable properties.
required: false
schema:
type: string
title: q
description: Search term to filter a tax region's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a tax region ID.
- type: array
description: Filter by tax region IDs.
items:
type: string
title: id
description: A tax region ID.
- name: country_code
in: query
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.
- type: object
description: Apply filters on the currency code.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: province_code
in: query
required: false
schema:
oneOf:
- type: string
title: province_code
description: Filter by a province code.
- type: array
description: Filter by province codes.
items:
type: string
title: province_code
description: A province code.
- type: object
description: Apply filters on the province code.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: parent_id
in: query
required: false
schema:
oneOf:
- type: string
title: parent_id
description: Filter by the ID of a parent tax region to retrieve its child tax regions.
- type: array
description: Filter by the IDs of parent tax regions to retrieve their child tax regions.
items:
type: string
title: parent_id
description: A tax region's ID.
- type: object
description: Apply filters on the parent tax region's ID to retrieve its child tax regions.
properties:
$eq:
type: string
description: Filter by an exact match.
$ne:
type: string
description: Filter by values not matching this parameter.
$in:
type: array
description: Filter by values in this array's items.
items:
type: string
$nin:
type: array
description: Filter by values not in this array's items.
items:
type: string
$like:
type: string
description: Apply a `like` filter. Useful for strings only.
$ilike:
type: string
description: Apply a case-insensitive `like` filter. Useful for strings only.
$re:
type: string
description: Apply a regex filter. Useful for strings only.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
$gt:
type: string
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
- name: created_by
in: query
required: false
schema:
oneOf:
- type: string
title: created_by
description: Filter by the ID of the user to retrieve the tax regions they created.
- type: array
description: Filter by user IDs to retrieve their tax regions they created.
items:
type: string
title: created_by
description: A user ID.
- name: created_at
in: query
description: Filter by a tax region's creation date.
required: false
schema:
oneOf:
- type: string
title: created_at
description: The tax region's created at.
- type: object
description: The tax region's created at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a tax region's update date.
required: false
schema:
oneOf:
- type: string
title: updated_at
description: The tax region's updated at.
- type: object
description: The tax region's updated at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a tax region's deletion date.
required: false
schema:
oneOf:
- type: string
title: deleted_at
description: The tax region's deleted at.
- type: object
description: The tax region's deleted at.
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.
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`).
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: $and
in: query
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: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/tax-regions' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Tax Regions
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of tax 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 tax regions.
required:
- tax_regions
properties:
tax_regions:
type: array
description: The list of tax regions.
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'
post:
operationId: PostTaxRegions
summary: Create Tax Region
description: Create a tax region.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateTaxRegion'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/tax-regions' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"country_code": "{value}",
"province_code": "{value}",
"parent_id": "{value}",
"metadata": {}
}'
tags:
- Tax Regions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTaxRegionResponse'
'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: createTaxRegionsWorkflow
/admin/tax-regions/{id}:
get:
operationId: GetTaxRegionsId
summary: Get a Tax Region
description: Retrieve a tax region by its ID. You can expand the tax region's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The tax region's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/tax-regions/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Tax Regions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTaxRegionResponse'
'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: DeleteTaxRegionsId
summary: Delete a Tax Region
description: Delete a tax region.
x-authenticated: true
parameters:
- name: id
in: path
description: The tax region's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/tax-regions/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Tax Regions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTaxRegionDeleteResponse'
'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: deleteTaxRegionsWorkflow
/admin/uploads:
post:
operationId: PostUploads
summary: Create Upload
description: Create a upload.
x-authenticated: true
parameters: []
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
description: SUMMARY
required:
- files
properties:
files:
type: array
description: The upload's files.
items:
oneOf:
- type: object
description: The file's files.
required:
- name
- content
properties:
name:
type: string
title: name
description: The file's name.
content:
type: string
title: content
description: The file's content.
- $ref: '#/components/schemas/File'
- $ref: '#/components/schemas/FileList'
description: SUMMARY
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/uploads' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Uploads
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFileListResponse'
'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: uploadFilesWorkflow
/admin/uploads/{id}:
get:
operationId: GetUploadsId
summary: Get a File
description: Retrieve an uploaded file by its ID. You can expand the file's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The upload's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/uploads/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Uploads
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFileResponse'
'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: DeleteUploadsId
summary: Delete a File
description: Delete a file. Uses the installed file module provider to delete the file.
x-authenticated: true
parameters:
- name: id
in: path
description: The file's ID.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X DELETE '{backend_url}/admin/uploads/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Uploads
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The file's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: file
deleted:
type: boolean
title: deleted
description: Whether the file was deleted.
'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: deleteFilesWorkflow
/admin/users:
get:
operationId: GetUsers
summary: List Users
description: Retrieve a list of users. The users can be filtered by fields such as `id`. The users can also be sorted or paginated.
x-authenticated: false
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: The search term to filter the user's searchable properties.
required: false
schema:
type: string
title: q
description: The search term to filter the user's searchable properties.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a user's ID.
- type: array
description: Filter by user IDs.
items:
type: string
title: id
description: A user's ID.
- name: email
in: query
description: Filter by an email.
required: false
schema:
type: string
title: email
description: Filter by an email.
format: email
- name: first_name
in: query
description: Filter by a first name.
required: false
schema:
type: string
title: first_name
description: Filter by a first name.
- name: last_name
in: query
description: Filter by a last name.
required: false
schema:
type: string
title: last_name
description: Filter by a last name.
- name: created_at
in: query
description: Filter by a user's creation date.
required: false
schema:
type: object
description: Filter by a user's creation date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: updated_at
in: query
description: Filter by a user's update date.
required: false
schema:
type: object
description: Filter by a user's update date.
properties:
$and:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
$or:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
$eq:
oneOf:
- type: string
title: $eq
description: Filter by an exact match.
- type: array
description: Filter by an exact match.
items:
type: string
title: $eq
description: Filter by an exact match.
$ne:
type: string
title: $ne
description: Filter by values not equal to this parameter.
$in:
type: array
description: Filter by values in this array.
items:
type: string
title: $in
description: Filter by values in this array.
$nin:
type: array
description: Filter by values not in this array.
items:
type: string
title: $nin
description: Filter by values not in this array.
$not:
oneOf:
- type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
- type: object
description: Filter by values not matching the conditions in this parameter.
- type: array
description: Filter by values not matching the conditions in this parameter.
items:
type: string
title: $not
description: Filter by values not matching the conditions in this parameter.
$gt:
type: string
title: $gt
description: Filter by values greater than this parameter. Useful for numbers and dates only.
$gte:
type: string
title: $gte
description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
$lt:
type: string
title: $lt
description: Filter by values less than this parameter. Useful for numbers and dates only.
$lte:
type: string
title: $lte
description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
$like:
type: string
title: $like
description: Apply a `like` filter. Useful for strings only.
$re:
type: string
title: $re
description: Apply a regex filter. Useful for strings only.
$ilike:
type: string
title: $ilike
description: Apply a case-insensitive `like` filter. Useful for strings only.
$fulltext:
type: string
title: $fulltext
description: Filter to apply on full-text properties.
$overlap:
type: array
description: Filter arrays that have overlapping values with this parameter.
items:
type: string
title: $overlap
description: Filter arrays that have overlapping values with this parameter.
$contains:
type: array
description: Filter arrays that contain some of the values of this parameter.
items:
type: string
title: $contains
description: Filter arrays that contain some of the values of this parameter.
$contained:
type: array
description: Filter arrays that contain all values of this parameter.
items:
type: string
title: $contained
description: Filter arrays that contain all values of this parameter.
$exists:
type: boolean
title: $exists
description: Filter by whether a value for this parameter exists (not `null`).
- name: deleted_at
in: query
description: Filter by a user's deletion date.
required: false
schema:
type: object
description: Filter by a user'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`).
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/admin/users'
tags:
- Users
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUserListResponse'
'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'
/admin/users/me:
get:
operationId: GetUsersMe
summary: Get Logged-In User
description: Retrieve the logged-in user's details.
x-authenticated: false
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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}/admin/users/me'
tags:
- Users
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUserResponse'
'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'
/admin/users/{id}:
get:
operationId: GetUsersId
summary: Get a User
description: Retrieve a user by its ID. You can expand the user's relations or select the fields that should be returned.
x-authenticated: false
parameters:
- name: id
in: path
description: The user's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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}/admin/users/{id}'
tags:
- Users
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUserResponse'
'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: PostUsersId
summary: Update a User
description: Update a user's details.
x-authenticated: false
parameters:
- name: id
in: path
description: The user's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateUser'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/users/{id}' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "{value}",
"last_name": "{value}",
"avatar_url": "{value}"
}'
tags:
- Users
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUserResponse'
'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: updateUsersWorkflow
delete:
operationId: DeleteUsersId
summary: Delete a User
description: Delete a user.
x-authenticated: false
parameters:
- name: id
in: path
description: The user's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X DELETE '{backend_url}/admin/users/{id}'
tags:
- Users
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUserDeleteResponse'
'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: deleteUsersWorkflow
/admin/workflows-executions:
get:
operationId: GetWorkflowsExecutions
summary: List Workflows Executions
description: Retrieve a list of workflows executions. The workflows executions can be filtered by fields such as `id`. The workflows executions can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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: transaction_id
in: query
required: false
schema:
oneOf:
- type: string
title: transaction_id
description: Filter by a transaction ID.
- type: array
description: Filter by transaction IDs.
items:
type: string
title: transaction_id
description: A transaction ID.
- name: workflow_id
in: query
required: false
schema:
oneOf:
- type: string
title: workflow_id
description: Filter by a workflow ID.
- type: array
description: Filter by workflow IDs.
items:
type: string
title: workflow_id
description: A workflow ID.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/workflows-executions' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Workflows Executions
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The paginated list of workflow executions.
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 workflow executions.
required:
- workflow_executions
properties:
workflow_executions:
type: array
description: The workflows execution's workflow executions.
items:
$ref: '#/components/schemas/AdminWorkflowExecution'
'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'
/admin/workflows-executions/{id}:
get:
operationId: GetWorkflowsExecutionsId
summary: Get a Workflows Execution
description: Retrieve a workflows execution by its ID. You can expand the workflows execution's relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The workflows execution's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/workflows-executions/{id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Workflows Executions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminWorkflowExecutionResponse'
'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'
/admin/workflows-executions/{workflow_id}/run:
post:
operationId: PostWorkflowsExecutionsWorkflow_idRun
summary: Add Runs to Workflows Execution
description: Add a list of runs to a workflows execution.
x-authenticated: true
parameters:
- name: workflow_id
in: path
description: The workflows execution's workflow id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateWorkflowsRun'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/run' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Workflows Executions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- acknowledgement
properties:
acknowledgement: {}
'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'
/admin/workflows-executions/{workflow_id}/steps/failure:
post:
operationId: PostWorkflowsExecutionsWorkflow_idStepsFailure
summary: Add Failures to Workflows Execution
description: Add a list of failures to a workflows execution.
x-authenticated: true
parameters:
- name: workflow_id
in: path
description: The workflows execution's workflow id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateWorkflowsAsyncResponse'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/steps/failure' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"transaction_id": "{value}",
"step_id": "{value}"
}'
tags:
- Workflows Executions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- success
properties:
success:
type: boolean
title: success
description: The workflows execution's success.
'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'
/admin/workflows-executions/{workflow_id}/steps/success:
post:
operationId: PostWorkflowsExecutionsWorkflow_idStepsSuccess
summary: Add Successes to Workflows Execution
description: Add a list of successes to a workflows execution.
x-authenticated: true
parameters:
- name: workflow_id
in: path
description: The workflows execution's workflow id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateWorkflowsAsyncResponse'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/admin/workflows-executions/{workflow_id}/steps/success' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"transaction_id": "{value}",
"step_id": "{value}"
}'
tags:
- Workflows Executions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
required:
- success
properties:
success:
type: boolean
title: success
description: The workflows execution's success.
'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'
/admin/workflows-executions/{workflow_id}/subscribe:
get:
operationId: GetWorkflowsExecutionsWorkflow_idSubscribe
summary: Subscribe to a Workflow's Execution
x-sidebar-summary: Subscribe to Workflow
description: |
Subscribe to a workflow's execution to receive real-time information about its steps, status, and data.
This route returns an event stream that you can consume using the [EventSource API](https://developer.mozilla.org/en-US/docs/Web/API/EventSource).
x-authenticated: true
parameters:
- name: workflow_id
in: path
description: The workflows execution's workflow id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/workflows-executions/{workflow_id}/subscribe' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Workflows Executions
responses:
'200':
description: Stream of the step's status.
content:
text/event-stream:
schema:
type: string
description: The step's status update and data changes.
example: |-
event: success
data: {}
'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'
/admin/workflows-executions/{workflow_id}/{transaction_id}:
get:
operationId: GetWorkflowsExecutionsWorkflow_idTransaction_id
summary: Get Workflow Execution's Details
x-sidebar-summary: Get Exection
description: Get the details of the workflow's execution.
x-authenticated: true
parameters:
- name: workflow_id
in: path
description: The workflows execution's workflow id.
required: true
schema:
type: string
- name: transaction_id
in: path
description: The workflows execution's transaction id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/workflows-executions/{workflow_id}/{transaction_id}' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Workflows Executions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AdminWorkflowExecutionResponse'
'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'
/admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe:
get:
operationId: GetWorkflowsExecutionsWorkflow_idTransaction_idStep_idSubscribe
summary: Subscribe to Step of a Workflow's Execution
x-sidebar-summary: Subscribe to Step
description: |
Subscribe to a step in a workflow's execution to receive real-time information about its status and data.
This route returns an event stream that you can consume using the [EventSource API](https://developer.mozilla.org/en-US/docs/Web/API/EventSource).
x-authenticated: true
parameters:
- name: workflow_id
in: path
description: The workflows execution's workflow id.
required: true
schema:
type: string
- name: transaction_id
in: path
description: The workflows execution's transaction id.
required: true
schema:
type: string
- name: step_id
in: path
description: The workflows execution's step id.
required: true
schema:
type: string
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe' \
-H 'x-medusa-access-token: {api_token}'
tags:
- Workflows Executions
responses:
'200':
description: Stream of the step's status.
content:
text/event-stream:
schema:
type: string
description: The step's status update and data changes.
example: |-
event: success
data: {}
'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 an admin user. The admin must be previously authenticated with the `/auth/user/{provider}` API route first, as the JWT token is required in the header of the request.
x-authenticated: true
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/auth/session' \
-H 'Authorization: Bearer {jwt_token}'
tags:
- Auth
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AuthAdminSessionResponse'
'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' \
-H 'Cookie: connect.sid={sid}'
tags:
- Auth
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
description: SUMMARY
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/user/{auth_provider}:
post:
operationId: PostActor_typeAuth_provider
summary: Authenticate User
description: Authenticate an admin user and receive the JWT token to be used in the header of subsequent requests.
x-authenticated: false
parameters:
- name: auth_provider
in: path
description: The provider used for authentication.
required: true
schema:
type: string
example: emailpass
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/auth/user/{auth_provider}'
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/user/{auth_provider}/callback:
post:
operationId: PostActor_typeAuth_providerCallback
summary: Validate Authentication Callback
description: Third-party authentication providers, such as Google, require an API route to call once authentication with the third-party provider is finished. This API route validates callback for admin users logged-in with third-party providers.
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: cURL
source: curl -X POST '{backend_url}/auth/user/{auth_provider}/callback'
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/user/{auth_provider}/register:
post:
operationId: PostActor_typeAuth_provider_register
summary: Retrieve Registration JWT Token
description: A registration JWT token is used in the header of requests that create a user, such as the accept invitation request. This API route retrieves the JWT token of a user that hasn't been registered yet.
x-authenticated: false
parameters:
- name: auth_provider
in: path
description: The provider used for authentication.
required: true
schema:
type: string
example: emailpass
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/auth/user/{auth_provider}/register'
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'
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
- 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 api key's redacted.
title:
type: string
title: title
description: The api key's title.
type:
type: string
description: The api key's type.
enum:
- secret
- publishable
last_used_at:
type: string
title: last_used_at
description: The api key's last used at.
format: date-time
created_by:
type: string
title: created_by
description: The api key's created by.
created_at:
type: string
format: date-time
title: created_at
description: The api key's created at.
revoked_by:
type: string
title: revoked_by
description: The api key's revoked by.
revoked_at:
type: string
title: revoked_at
description: The api key's revoked at.
format: date-time
AdminApiKeyResponse:
type: object
description: SUMMARY
x-schemaName: AdminApiKeyResponse
required:
- api_key
properties:
api_key:
$ref: '#/components/schemas/AdminApiKey'
AdminArchiveOrder:
type: object
description: SUMMARY
x-schemaName: AdminArchiveOrder
required:
- order_id
properties:
order_id:
type: string
title: order_id
description: The order's order id.
AdminBatchProductRequest:
type: object
description: SUMMARY
x-schemaName: AdminBatchProductRequest
properties:
create:
type: array
description: The product's create.
items:
$ref: '#/components/schemas/AdminCreateProduct'
update:
type: array
description: The product's update.
items:
$ref: '#/components/schemas/AdminUpdateProduct'
delete:
type: array
description: The product's delete.
items:
type: string
title: delete
description: The delete's details.
AdminBatchProductResponse:
type: object
description: SUMMARY
x-schemaName: AdminBatchProductResponse
required:
- created
- updated
- deleted
properties:
created:
type: array
description: The product's created.
items:
$ref: '#/components/schemas/AdminProduct'
updated:
type: array
description: The product's updated.
items:
$ref: '#/components/schemas/AdminProduct'
deleted:
type: object
description: SUMMARY
required:
- ids
- object
- deleted
properties:
ids:
type: array
description: The deleted's ids.
items:
type: string
title: ids
description: The id's ids.
object:
type: string
title: object
description: SUMMARY
deleted:
type: boolean
title: deleted
description: SUMMARY
AdminBatchProductVariantRequest:
type: object
description: SUMMARY
x-schemaName: AdminBatchProductVariantRequest
properties:
create:
type: array
description: The product's create.
items:
$ref: '#/components/schemas/AdminCreateProductVariant'
update:
type: array
description: The product's update.
items:
$ref: '#/components/schemas/AdminUpdateProductVariant'
delete:
type: array
description: The product's delete.
items:
type: string
title: delete
description: The delete's details.
AdminBatchProductVariantResponse:
type: object
description: SUMMARY
x-schemaName: AdminBatchProductVariantResponse
required:
- created
- updated
- deleted
properties:
created:
type: array
description: The product's created.
items:
$ref: '#/components/schemas/AdminProductVariant'
updated:
type: array
description: The product's updated.
items:
$ref: '#/components/schemas/AdminProductVariant'
deleted:
type: object
description: SUMMARY
required:
- ids
- object
- deleted
properties:
ids:
type: array
description: The deleted's ids.
items:
type: string
title: ids
description: The id's ids.
object:
type: string
title: object
description: SUMMARY
deleted:
type: boolean
title: deleted
description: SUMMARY
AdminCampaign:
type: object
description: The campaign's details.
x-schemaName: AdminCampaign
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
description: The budget's type.
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.
AdminCampaignResponse:
type: object
description: SUMMARY
x-schemaName: AdminCampaignResponse
required:
- campaign
properties:
campaign:
$ref: '#/components/schemas/AdminCampaign'
AdminCancelFulfillment:
type: object
description: SUMMARY
x-schemaName: AdminCancelFulfillment
AdminClaim:
type: object
description: The claim's details.
x-schemaName: AdminClaim
required:
- order_id
- claim_items
- additional_items
- currency_code
- id
- region_id
- customer_id
- sales_channel_id
- email
- shipping_methods
- payment_status
- fulfillment_status
- summary
- metadata
- 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:
order_id:
type: string
title: order_id
description: The claim's order id.
claim_items:
type: array
description: The claim's claim items.
items:
$ref: '#/components/schemas/BaseClaimItem'
additional_items:
type: array
description: The claim's additional items.
items: {}
return:
$ref: '#/components/schemas/Return'
return_id:
type: string
title: return_id
description: The claim's return id.
no_notification:
type: boolean
title: no_notification
description: The claim's no notification.
refund_amount:
type: number
title: refund_amount
description: The claim's refund amount.
currency_code:
type: string
title: currency_code
description: The claim's currency code.
id:
type: string
title: id
description: The claim's ID.
region_id:
type: string
title: region_id
description: The claim's region id.
customer_id:
type: string
title: customer_id
description: The claim's customer id.
sales_channel_id:
type: string
title: sales_channel_id
description: The claim's sales channel id.
email:
type: string
title: email
description: The claim's email.
format: email
display_id:
type: number
title: display_id
description: The claim's display id.
shipping_address:
$ref: '#/components/schemas/BaseOrderAddress'
billing_address:
$ref: '#/components/schemas/BaseOrderAddress'
shipping_methods:
type: array
description: The claim's shipping methods.
items:
$ref: '#/components/schemas/BaseOrderShippingMethod'
payment_collections:
type: array
description: The claim's payment collections.
items:
$ref: '#/components/schemas/BasePaymentCollection'
payment_status:
type: string
description: The claim's payment status.
enum:
- canceled
- not_paid
- awaiting
- authorized
- partially_authorized
- captured
- partially_captured
- partially_refunded
- refunded
- requires_action
fulfillments:
type: array
description: The claim's fulfillments.
items:
$ref: '#/components/schemas/BaseOrderFulfillment'
fulfillment_status:
type: string
description: The claim's fulfillment status.
enum:
- canceled
- not_fulfilled
- partially_fulfilled
- fulfilled
- partially_shipped
- shipped
- partially_delivered
- delivered
transactions:
type: array
description: The claim's transactions.
items:
$ref: '#/components/schemas/BaseOrderTransaction'
summary:
$ref: '#/components/schemas/BaseOrderSummary'
metadata:
type: object
description: The claim's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The claim's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The claim's updated at.
original_item_total:
type: number
title: original_item_total
description: The claim's original item total.
original_item_subtotal:
type: number
title: original_item_subtotal
description: The claim's original item subtotal.
original_item_tax_total:
type: number
title: original_item_tax_total
description: The claim's original item tax total.
item_total:
type: number
title: item_total
description: The claim's item total.
item_subtotal:
type: number
title: item_subtotal
description: The claim's item subtotal.
item_tax_total:
type: number
title: item_tax_total
description: The claim's item tax total.
original_total:
type: number
title: original_total
description: The claim's original total.
original_subtotal:
type: number
title: original_subtotal
description: The claim's original subtotal.
original_tax_total:
type: number
title: original_tax_total
description: The claim's original tax total.
total:
type: number
title: total
description: The claim's total.
subtotal:
type: number
title: subtotal
description: The claim's subtotal.
tax_total:
type: number
title: tax_total
description: The claim's tax total.
discount_total:
type: number
title: discount_total
description: The claim's discount total.
discount_tax_total:
type: number
title: discount_tax_total
description: The claim's discount tax total.
gift_card_total:
type: number
title: gift_card_total
description: The claim's gift card total.
gift_card_tax_total:
type: number
title: gift_card_tax_total
description: The claim's gift card tax total.
shipping_total:
type: number
title: shipping_total
description: The claim's shipping total.
shipping_subtotal:
type: number
title: shipping_subtotal
description: The claim's shipping subtotal.
shipping_tax_total:
type: number
title: shipping_tax_total
description: The claim's shipping tax total.
original_shipping_total:
type: number
title: original_shipping_total
description: The claim's original shipping total.
original_shipping_subtotal:
type: number
title: original_shipping_subtotal
description: The claim's original shipping subtotal.
original_shipping_tax_total:
type: number
title: original_shipping_tax_total
description: The claim's original shipping tax total.
AdminClaimDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminClaimListResponse
required:
- limit
- offset
- count
- claims
properties:
limit:
type: number
title: limit
description: The claim's limit.
offset:
type: number
title: offset
description: The claim's offset.
count:
type: number
title: count
description: The claim's count.
claims:
type: array
description: The claim's claims.
items:
$ref: '#/components/schemas/AdminClaim'
AdminClaimOrderResponse:
type: object
description: SUMMARY
x-schemaName: AdminClaimOrderResponse
required:
- order
- claim
properties:
order:
$ref: '#/components/schemas/Order'
claim:
$ref: '#/components/schemas/AdminClaim'
AdminClaimPreviewResponse:
type: object
description: SUMMARY
x-schemaName: AdminClaimPreviewResponse
required:
- order_preview
- claim
properties:
order_preview:
$ref: '#/components/schemas/OrderPreview'
claim:
$ref: '#/components/schemas/AdminClaim'
AdminClaimRequestResponse:
type: object
description: SUMMARY
x-schemaName: AdminClaimRequestResponse
required:
- return
- order_preview
- claim
properties:
return:
$ref: '#/components/schemas/AdminReturn'
order_preview:
$ref: '#/components/schemas/OrderPreview'
claim:
$ref: '#/components/schemas/AdminClaim'
AdminClaimResponse:
type: object
description: SUMMARY
x-schemaName: AdminClaimResponse
required:
- claim
properties:
claim:
$ref: '#/components/schemas/AdminClaim'
AdminClaimReturnPreviewResponse:
type: object
description: SUMMARY
x-schemaName: AdminClaimReturnPreviewResponse
required:
- order_preview
- return
properties:
order_preview:
$ref: '#/components/schemas/OrderPreview'
return:
$ref: '#/components/schemas/AdminReturn'
AdminCollection:
type: object
description: The parent's collection.
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 created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The collection's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The collection's deleted at.
products:
type: array
description: The collection's products.
items:
type: object
metadata:
type: object
description: The collection's metadata.
AdminCollectionDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminCollectionListResponse
required:
- limit
- offset
- count
- collections
properties:
limit:
type: number
title: limit
description: The collection's limit.
offset:
type: number
title: offset
description: The collection's offset.
count:
type: number
title: count
description: The collection's count.
collections:
type: array
description: The collection's collections.
items:
$ref: '#/components/schemas/AdminCollection'
AdminCollectionResponse:
type: object
description: SUMMARY
x-schemaName: AdminCollectionResponse
required:
- collection
properties:
collection:
$ref: '#/components/schemas/AdminCollection'
AdminCreateApiKey:
type: object
description: SUMMARY
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.
enum:
- publishable
- secret
AdminCreateApplicationMethod:
type: object
description: The promotion's application method.
x-schemaName: AdminCreateApplicationMethod
required:
- value
- type
- target_type
properties:
description:
type: string
title: description
description: The application method's description.
value:
type: number
title: value
description: The application method's value.
currency_code:
type: string
title: currency_code
description: The application method's currency code.
max_quantity:
type: number
title: max_quantity
description: The application method's max quantity.
type:
type: string
description: The application method's type.
enum:
- fixed
- percentage
target_type:
type: string
description: The application method's target type.
enum:
- items
- shipping_methods
- order
allocation:
type: string
description: The application method's allocation.
enum:
- each
- across
target_rules:
type: array
description: The application method's target rules.
items:
$ref: '#/components/schemas/AdminCreatePromotionRule'
buy_rules:
type: array
description: The application method's buy rules.
items:
$ref: '#/components/schemas/AdminCreatePromotionRule'
apply_to_quantity:
type: number
title: apply_to_quantity
description: The application method's apply to quantity.
buy_rules_min_quantity:
type: number
title: buy_rules_min_quantity
description: The application method's buy rules min quantity.
AdminCreateCampaign:
type: object
description: The promotion's campaign.
x-schemaName: AdminCreateCampaign
properties:
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.
format: date-time
ends_at:
type: string
title: ends_at
description: The campaign's ends at.
format: date-time
budget:
type: object
description: The campaign's budget.
properties:
type:
type: string
description: The budget's type.
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.
AdminCreateCollection:
type: object
description: SUMMARY
x-schemaName: AdminCreateCollection
required:
- title
- metadata
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.
AdminCreateCustomerGroup:
type: object
description: SUMMARY
x-schemaName: AdminCreateCustomerGroup
required:
- name
- metadata
properties:
name:
type: string
title: name
description: The customer group's name.
metadata:
type: object
description: The customer group's metadata.
AdminCreateFulfillment:
type: object
description: SUMMARY
x-schemaName: AdminCreateFulfillment
required:
- location_id
- provider_id
- delivery_address
- items
- labels
- order
- order_id
- shipping_option_id
- data
- packed_at
- shipped_at
- delivered_at
- canceled_at
- metadata
properties:
location_id:
type: string
title: location_id
description: The fulfillment's location id.
provider_id:
type: string
title: provider_id
description: The fulfillment's provider id.
delivery_address:
type: object
description: The fulfillment's delivery address.
required:
- first_name
- last_name
- phone
- company
- address_1
- address_2
- city
- country_code
- province
- postal_code
- metadata
properties:
first_name:
type: string
title: first_name
description: The delivery address's first name.
last_name:
type: string
title: last_name
description: The delivery address's last name.
phone:
type: string
title: phone
description: The delivery address'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 address 1.
address_2:
type: string
title: address_2
description: The delivery address's address 2.
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.
items:
type: array
description: The fulfillment's items.
items:
type: object
description: The item's items.
required:
- title
- sku
- quantity
- barcode
- line_item_id
- inventory_item_id
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 item's quantity.
barcode:
type: string
title: barcode
description: The item's barcode.
line_item_id:
type: string
title: line_item_id
description: The item's line item id.
inventory_item_id:
type: string
title: inventory_item_id
description: The item's inventory item id.
labels:
type: array
description: The fulfillment's labels.
items:
type: object
description: The label's labels.
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 label url.
order:
type: object
description: The fulfillment's order.
order_id:
type: string
title: order_id
description: The fulfillment's order id.
shipping_option_id:
type: string
title: shipping_option_id
description: The fulfillment's shipping option id.
data:
type: object
description: The fulfillment's data.
packed_at:
type: string
title: packed_at
description: The fulfillment's packed at.
format: date-time
shipped_at:
type: string
title: shipped_at
description: The fulfillment's shipped at.
format: date-time
delivered_at:
type: string
title: delivered_at
description: The fulfillment's delivered at.
format: date-time
canceled_at:
type: string
title: canceled_at
description: The fulfillment's canceled at.
format: date-time
metadata:
type: object
description: The fulfillment's metadata.
AdminCreateInventoryItem:
type: object
description: SUMMARY
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 inventory item's description.
requires_shipping:
type: boolean
title: requires_shipping
description: The inventory item's requires shipping.
thumbnail:
type: string
title: thumbnail
description: The inventory item's thumbnail.
metadata:
type: object
description: The inventory item's metadata.
AdminCreatePriceList:
type: object
description: SUMMARY
x-schemaName: AdminCreatePriceList
required:
- title
- description
- starts_at
- ends_at
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 price list's starts at.
ends_at:
type: string
title: ends_at
description: The price list's ends at.
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.
prices:
type: array
description: The price list's prices.
items:
type: object
description: The price's prices.
required:
- currency_code
- amount
- variant_id
- min_quantity
- max_quantity
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 price's variant id.
min_quantity:
type: number
title: min_quantity
description: The price's min quantity.
max_quantity:
type: number
title: max_quantity
description: The price's max quantity.
rules:
type: object
description: The price's rules.
AdminCreatePricePreference:
type: object
description: SUMMARY
x-schemaName: AdminCreatePricePreference
properties:
attribute:
type: string
title: attribute
description: The price preference's attribute.
value:
type: string
title: value
description: The price preference's value.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The price preference's is tax inclusive.
AdminCreateProduct:
type: object
description: The create's details.
x-schemaName: AdminCreateProduct
required:
- title
properties:
title:
type: string
title: title
description: The create's title.
subtitle:
type: string
title: subtitle
description: The create's subtitle.
description:
type: string
title: description
description: The create's description.
is_giftcard:
type: boolean
title: is_giftcard
description: The create's is giftcard.
discountable:
type: boolean
title: discountable
description: The create's discountable.
images:
type: array
description: The create's images.
items:
type: object
description: The image's images.
required:
- url
properties:
url:
type: string
title: url
description: The image's url.
thumbnail:
type: string
title: thumbnail
description: The create's thumbnail.
handle:
type: string
title: handle
description: The create's handle.
status:
type: string
description: The create's status.
enum:
- draft
- proposed
- published
- rejected
type_id:
type: string
title: type_id
description: The create's type id.
collection_id:
type: string
title: collection_id
description: The create's collection id.
categories:
type: array
description: The create's categories.
items:
type: object
description: The category's categories.
required:
- id
properties:
id:
type: string
title: id
description: The category's ID.
tags:
type: array
description: The create's tags.
items:
type: object
description: The tag's tags.
required:
- id
properties:
id:
type: string
title: id
description: The tag's ID.
options:
type: array
description: The create's options.
items:
$ref: '#/components/schemas/AdminCreateProductOption'
variants:
type: array
description: The create's variants.
items:
$ref: '#/components/schemas/AdminCreateProductVariant'
sales_channels:
type: array
description: The create's sales channels.
items:
type: object
description: The sales channel's sales channels.
required:
- id
properties:
id:
type: string
title: id
description: The sales channel's ID.
weight:
type: number
title: weight
description: The create's weight.
length:
type: number
title: length
description: The create's length.
height:
type: number
title: height
description: The create's height.
width:
type: number
title: width
description: The create's width.
hs_code:
type: string
title: hs_code
description: The create's hs code.
mid_code:
type: string
title: mid_code
description: The create's mid code.
origin_country:
type: string
title: origin_country
description: The create's origin country.
material:
type: string
title: material
description: The create's material.
metadata:
type: object
description: The create's metadata.
AdminCreateProductCategory:
type: object
description: SUMMARY
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: The product category's is internal.
is_active:
type: boolean
title: is_active
description: The product category's is active.
parent_category_id:
type: string
title: parent_category_id
description: The product category's parent category id.
rank:
type: number
title: rank
description: The product category's rank.
metadata:
type: object
description: The product category's metadata.
AdminCreateProductOption:
type: object
description: SUMMARY
x-schemaName: AdminCreateProductOption
required:
- title
- values
properties:
title:
type: string
title: title
description: The product's title.
values:
type: array
description: The product's values.
items:
type: string
title: values
description: The value's values.
AdminCreateProductTag:
type: object
description: SUMMARY
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.
AdminCreateProductVariant:
type: object
description: The create's details.
x-schemaName: AdminCreateProductVariant
required:
- title
- prices
properties:
title:
type: string
title: title
description: The create's title.
sku:
type: string
title: sku
description: The create's sku.
ean:
type: string
title: ean
description: The create's ean.
upc:
type: string
title: upc
description: The create's upc.
barcode:
type: string
title: barcode
description: The create's barcode.
hs_code:
type: string
title: hs_code
description: The create's hs code.
mid_code:
type: string
title: mid_code
description: The create's mid code.
allow_backorder:
type: boolean
title: allow_backorder
description: The create's allow backorder.
manage_inventory:
type: boolean
title: manage_inventory
description: The create's manage inventory.
variant_rank:
type: number
title: variant_rank
description: The create's variant rank.
weight:
type: number
title: weight
description: The create's weight.
length:
type: number
title: length
description: The create's length.
height:
type: number
title: height
description: The create's height.
width:
type: number
title: width
description: The create's width.
origin_country:
type: string
title: origin_country
description: The create's origin country.
material:
type: string
title: material
description: The create's material.
metadata:
type: object
description: The create's metadata.
prices:
type: array
description: The create's prices.
items:
$ref: '#/components/schemas/AdminCreateProductVariantPrice'
options:
type: object
description: The create's options.
AdminCreateProductVariantPrice:
type: object
description: The price's prices.
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 price's min quantity.
max_quantity:
type: number
title: max_quantity
description: The price's max quantity.
rules:
type: object
description: The price's rules.
AdminCreatePromotionRule:
type: object
description: The rule's rules.
x-schemaName: AdminCreatePromotionRule
required:
- operator
- attribute
- values
properties:
operator:
type: string
description: The rule's operator.
enum:
- gt
- lt
- eq
- ne
- in
- lte
- gte
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
values:
oneOf:
- type: string
title: values
description: The rule's values.
- type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
AdminCreateRefundReason:
type: object
description: SUMMARY
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: SUMMARY
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.
countries:
type: array
description: The region's countries.
items:
type: string
title: countries
description: The country's countries.
automatic_taxes:
type: boolean
title: automatic_taxes
description: The region's automatic taxes.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The region's is tax inclusive.
payment_providers:
type: array
description: The region's payment providers.
items:
type: string
title: payment_providers
description: The payment provider's payment providers.
metadata:
type: object
description: The region's metadata.
AdminCreateReservation:
type: object
description: SUMMARY
x-schemaName: AdminCreateReservation
required:
- location_id
- inventory_item_id
- quantity
properties:
line_item_id:
type: string
title: line_item_id
description: The reservation's line item id.
location_id:
type: string
title: location_id
description: The reservation's location id.
inventory_item_id:
type: string
title: inventory_item_id
description: The reservation's inventory item id.
quantity:
type: number
title: quantity
description: The reservation's quantity.
description:
type: string
title: description
description: The reservation's description.
metadata:
type: object
description: The reservation's metadata.
AdminCreateSalesChannel:
type: object
description: SUMMARY
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: The sales channel's is disabled.
metadata:
type: object
description: The sales channel's metadata.
AdminCreateShipment:
type: object
description: SUMMARY
x-schemaName: AdminCreateShipment
required:
- labels
properties:
labels:
type: array
description: The fulfillment's labels.
items:
type: object
description: The label's labels.
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 label url.
AdminCreateShippingOption:
type: object
description: SUMMARY
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 shipping option's service zone id.
shipping_profile_id:
type: string
title: shipping_profile_id
description: The shipping option's shipping profile id.
data:
type: object
description: The shipping option's data.
price_type:
type: string
description: The shipping option's price type.
enum:
- flat
- calculated
provider_id:
type: string
title: provider_id
description: The shipping option's provider id.
type:
type: object
prices:
type: array
description: The shipping option's prices.
items:
oneOf:
- type: object
description: The price's prices.
x-schemaName: AdminCreateShippingOptionPriceWithCurrency
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.
- type: object
description: The price's prices.
x-schemaName: AdminCreateShippingOptionPriceWithRegion
required:
- region_id
- amount
properties:
region_id:
type: string
title: region_id
description: The price's region id.
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 rule's rules.
x-schemaName: AdminCreateShippingOptionRule
required:
- operator
- attribute
- value
properties:
operator:
type: string
description: The rule's operator.
enum:
- gt
- lt
- eq
- ne
- in
- lte
- gte
- nin
attribute:
type: string
title: attribute
description: The rule's attribute.
value:
oneOf:
- type: string
title: value
description: The rule's value.
- type: array
description: The rule's value.
items:
type: string
title: value
description: The value's details.
AdminCreateShippingProfile:
type: object
description: SUMMARY
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.
x-schemaName: AdminCreateShippingProfile
AdminCreateStockLocation:
type: object
description: SUMMARY
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 stock location's address id.
address:
$ref: '#/components/schemas/AdminUpsertStockLocationAddress'
metadata:
type: object
description: The stock location's metadata.
AdminCreateTaxRate:
type: object
description: SUMMARY
x-schemaName: AdminCreateTaxRate
required:
- name
- tax_region_id
properties:
name:
type: string
title: name
description: The tax rate's name.
tax_region_id:
type: string
title: tax_region_id
description: The tax rate's tax region id.
rate:
type: number
title: rate
description: The tax rate's rate.
code:
type: string
title: code
description: The tax rate's code.
rules:
type: array
description: The tax rate's rules.
items:
$ref: '#/components/schemas/AdminCreateTaxRateRule'
is_default:
type: boolean
title: is_default
description: The tax rate's is default.
is_combinable:
type: boolean
title: is_combinable
description: The tax rate's is combinable.
metadata:
type: object
description: The tax rate's metadata.
AdminCreateTaxRateRule:
type: object
description: SUMMARY
x-schemaName: AdminCreateTaxRateRule
required:
- reference
- reference_id
properties:
reference:
type: string
title: reference
description: The tax rate's reference.
reference_id:
type: string
title: reference_id
description: The tax rate's reference id.
AdminCreateTaxRegion:
type: object
description: SUMMARY
x-schemaName: AdminCreateTaxRegion
required:
- country_code
properties:
country_code:
type: string
title: country_code
description: The tax region's country code.
province_code:
type: string
title: province_code
description: The tax region's province code.
parent_id:
type: string
title: parent_id
description: The tax region's parent id.
default_tax_rate:
type: object
description: The tax region's default tax rate.
required:
- name
properties:
rate:
type: number
title: rate
description: The default tax rate's rate.
code:
type: string
title: code
description: The default tax rate's code.
name:
type: string
title: name
description: The default tax rate's name.
is_combinable:
type: boolean
title: is_combinable
description: The default tax rate's is combinable.
metadata:
type: object
description: The default tax rate's metadata.
metadata:
type: object
description: The tax region's metadata.
AdminCreateVariantInventoryItem:
type: object
description: SUMMARY
x-schemaName: AdminCreateVariantInventoryItem
required:
- required_quantity
- inventory_item_id
properties:
required_quantity:
type: number
title: required_quantity
description: The product's required quantity.
inventory_item_id:
type: string
title: inventory_item_id
description: The product's inventory item id.
AdminCreateWorkflowsAsyncResponse:
type: object
description: SUMMARY
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 workflows execution's step id.
response: {}
compensate_input: {}
action:
type: string
description: The workflows execution's action.
enum:
- invoke
- compensate
AdminCreateWorkflowsRun:
type: object
description: SUMMARY
x-schemaName: AdminCreateWorkflowsRun
properties:
input: {}
transaction_id:
type: string
title: transaction_id
description: The workflows execution's transaction id.
AdminCurrency:
type: object
description: The supported currency's currency.
x-schemaName: AdminCurrency
AdminCurrencyListResponse:
type: object
description: SUMMARY
x-schemaName: AdminCurrencyListResponse
required:
- limit
- offset
- count
- currencies
properties:
limit:
type: number
title: limit
description: The currency's limit.
offset:
type: number
title: offset
description: The currency's offset.
count:
type: number
title: count
description: The currency's count.
currencies:
type: array
description: The currency's currencies.
items:
$ref: '#/components/schemas/AdminCurrency'
AdminCurrencyResponse:
type: object
description: SUMMARY
x-schemaName: AdminCurrencyResponse
required:
- currency
properties:
currency:
$ref: '#/components/schemas/AdminCurrency'
AdminCustomer:
type: object
description: The order's customer.
x-schemaName: AdminCustomer
required:
- has_account
- id
- email
- default_billing_address_id
- default_shipping_address_id
- company_name
- first_name
- last_name
- addresses
properties:
has_account:
type: boolean
title: has_account
description: The customer's has account.
groups:
type: array
description: The customer's groups.
items:
$ref: '#/components/schemas/AdminCustomerGroup'
id:
type: string
title: id
description: The customer's ID.
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 customer's default billing address id.
default_shipping_address_id:
type: string
title: default_shipping_address_id
description: The customer's default shipping address id.
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/BaseCustomerAddress'
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
created_by:
type: string
title: created_by
description: The customer's created by.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The customer's deleted at.
created_at:
type: string
format: date-time
title: created_at
description: The customer's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The customer's updated at.
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 address name.
is_default_shipping:
type: boolean
title: is_default_shipping
description: The address's is default shipping.
is_default_billing:
type: boolean
title: is_default_billing
description: The address's is default billing.
customer_id:
type: string
title: customer_id
description: The address's customer id.
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 address 1.
address_2:
type: string
title: address_2
description: The address's address 2.
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.
created_at:
type: string
format: date-time
title: created_at
description: The address's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The address's updated at.
AdminCustomerAddressResponse:
type: object
description: SUMMARY
x-schemaName: AdminCustomerAddressResponse
required:
- address
properties:
address:
$ref: '#/components/schemas/AdminCustomerAddress'
AdminCustomerGroup:
type: object
description: The group's groups.
x-schemaName: AdminCustomerGroup
AdminCustomerGroupResponse:
type: object
description: SUMMARY
x-schemaName: AdminCustomerGroupResponse
required:
- customer_group
properties:
customer_group:
$ref: '#/components/schemas/AdminCustomerGroup'
AdminCustomerInGroupFilters:
type: object
description: The customer group's customers.
x-schemaName: AdminCustomerInGroupFilters
properties:
id:
oneOf:
- type: string
title: id
description: The customer's ID.
- type: array
description: The customer's ID.
items:
type: string
title: id
description: The id's ID.
email:
oneOf:
- type: string
title: email
description: The customer's email.
format: email
- type: array
description: The customer's email.
items:
type: string
title: email
description: The email's details.
format: email
- type: object
description: 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 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`).
default_billing_address_id:
oneOf:
- type: string
title: default_billing_address_id
description: The customer's default billing address id.
- type: array
description: The customer's default billing address id.
items:
type: string
title: default_billing_address_id
description: The default billing address id's details.
default_shipping_address_id:
oneOf:
- type: string
title: default_shipping_address_id
description: The customer's default shipping address id.
- type: array
description: The customer's default shipping address id.
items:
type: string
title: default_shipping_address_id
description: The default shipping address id's details.
company_name:
oneOf:
- type: string
title: company_name
description: The customer's company name.
- type: array
description: The customer's company name.
items:
type: string
title: company_name
description: The company name's details.
first_name:
oneOf:
- type: string
title: first_name
description: The customer's first name.
- type: array
description: The customer's first name.
items:
type: string
title: first_name
description: The first name's details.
last_name:
oneOf:
- type: string
title: last_name
description: The customer's last name.
- type: array
description: The customer's last name.
items:
type: string
title: last_name
description: The last name's details.
created_by:
oneOf:
- type: string
title: created_by
description: The customer's created by.
- type: array
description: The customer's created by.
items:
type: string
title: created_by
description: The created by's details.
created_at:
type: object
description: The customer's created at.
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`).
updated_at:
type: object
description: The customer's updated at.
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: The customer's deleted at.
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: SUMMARY
x-schemaName: AdminCustomerResponse
required:
- customer
properties:
customer:
$ref: '#/components/schemas/AdminCustomer'
AdminDeletePaymentCollectionResponse:
type: object
description: SUMMARY
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: SUMMARY
default: payment-collection
deleted:
type: boolean
title: deleted
description: SUMMARY
AdminDraftOrderResponse:
type: object
description: SUMMARY
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:
- order_id
- return_items
- additional_items
- currency_code
- id
- region_id
- customer_id
- sales_channel_id
- email
- shipping_methods
- payment_status
- fulfillment_status
- summary
- metadata
- 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:
order_id:
type: string
title: order_id
description: The exchange's order id.
return_items:
type: array
description: The exchange's return items.
items:
$ref: '#/components/schemas/AdminReturnItem'
additional_items:
type: array
description: The exchange's additional items.
items:
$ref: '#/components/schemas/BaseExchangeItem'
no_notification:
type: boolean
title: no_notification
description: The exchange's no notification.
difference_due:
type: number
title: difference_due
description: The exchange's difference due.
return:
$ref: '#/components/schemas/AdminReturn'
return_id:
type: string
title: return_id
description: The exchange's return id.
currency_code:
type: string
title: currency_code
description: The exchange's currency code.
id:
type: string
title: id
description: The exchange's ID.
region_id:
type: string
title: region_id
description: The exchange's region id.
customer_id:
type: string
title: customer_id
description: The exchange's customer id.
sales_channel_id:
type: string
title: sales_channel_id
description: The exchange's sales channel id.
email:
type: string
title: email
description: The exchange's email.
format: email
display_id:
type: number
title: display_id
description: The exchange's display id.
shipping_address:
$ref: '#/components/schemas/BaseOrderAddress'
billing_address:
$ref: '#/components/schemas/BaseOrderAddress'
shipping_methods:
type: array
description: The exchange's shipping methods.
items:
$ref: '#/components/schemas/BaseOrderShippingMethod'
payment_collections:
type: array
description: The exchange's payment collections.
items:
$ref: '#/components/schemas/BasePaymentCollection'
payment_status:
type: string
description: The exchange's payment status.
enum:
- canceled
- not_paid
- awaiting
- authorized
- partially_authorized
- captured
- partially_captured
- partially_refunded
- refunded
- requires_action
fulfillments:
type: array
description: The exchange's fulfillments.
items:
$ref: '#/components/schemas/BaseOrderFulfillment'
fulfillment_status:
type: string
description: The exchange's fulfillment status.
enum:
- canceled
- not_fulfilled
- partially_fulfilled
- fulfilled
- partially_shipped
- shipped
- partially_delivered
- delivered
transactions:
type: array
description: The exchange's transactions.
items:
$ref: '#/components/schemas/BaseOrderTransaction'
summary:
$ref: '#/components/schemas/BaseOrderSummary'
metadata:
type: object
description: The exchange's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The exchange's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The exchange's updated at.
original_item_total:
type: number
title: original_item_total
description: The exchange's original item total.
original_item_subtotal:
type: number
title: original_item_subtotal
description: The exchange's original item subtotal.
original_item_tax_total:
type: number
title: original_item_tax_total
description: The exchange's original item tax total.
item_total:
type: number
title: item_total
description: The exchange's item total.
item_subtotal:
type: number
title: item_subtotal
description: The exchange's item subtotal.
item_tax_total:
type: number
title: item_tax_total
description: The exchange's item tax total.
original_total:
type: number
title: original_total
description: The exchange's original total.
original_subtotal:
type: number
title: original_subtotal
description: The exchange's original subtotal.
original_tax_total:
type: number
title: original_tax_total
description: The exchange's original tax total.
total:
type: number
title: total
description: The exchange's total.
subtotal:
type: number
title: subtotal
description: The exchange's subtotal.
tax_total:
type: number
title: tax_total
description: The exchange's tax total.
discount_total:
type: number
title: discount_total
description: The exchange's discount total.
discount_tax_total:
type: number
title: discount_tax_total
description: The exchange's discount tax total.
gift_card_total:
type: number
title: gift_card_total
description: The exchange's gift card total.
gift_card_tax_total:
type: number
title: gift_card_tax_total
description: The exchange's gift card tax total.
shipping_total:
type: number
title: shipping_total
description: The exchange's shipping total.
shipping_subtotal:
type: number
title: shipping_subtotal
description: The exchange's shipping subtotal.
shipping_tax_total:
type: number
title: shipping_tax_total
description: The exchange's shipping tax total.
original_shipping_total:
type: number
title: original_shipping_total
description: The exchange's original shipping total.
original_shipping_subtotal:
type: number
title: original_shipping_subtotal
description: The exchange's original shipping subtotal.
original_shipping_tax_total:
type: number
title: original_shipping_tax_total
description: The exchange's original shipping tax total.
AdminExchangeDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminExchangeOrderResponse
required:
- order
- exchange
properties:
order:
$ref: '#/components/schemas/Order'
exchange:
$ref: '#/components/schemas/AdminExchange'
AdminExchangePreviewResponse:
type: object
description: SUMMARY
x-schemaName: AdminExchangePreviewResponse
required:
- order_preview
- exchange
properties:
order_preview:
$ref: '#/components/schemas/OrderPreview'
exchange:
$ref: '#/components/schemas/AdminExchange'
AdminExchangeRequestResponse:
type: object
description: SUMMARY
x-schemaName: AdminExchangeRequestResponse
required:
- return
- order_preview
- exchange
properties:
return:
$ref: '#/components/schemas/AdminReturn'
order_preview:
$ref: '#/components/schemas/OrderPreview'
exchange:
$ref: '#/components/schemas/AdminExchange'
AdminExchangeResponse:
type: object
description: SUMMARY
x-schemaName: AdminExchangeResponse
required:
- exchange
properties:
exchange:
$ref: '#/components/schemas/AdminExchange'
AdminExchangeReturnResponse:
type: object
description: SUMMARY
x-schemaName: AdminExchangeReturnResponse
required:
- order_preview
- return
properties:
order_preview:
$ref: '#/components/schemas/OrderPreview'
return:
$ref: '#/components/schemas/AdminReturn'
AdminExportProductRequest:
type: object
description: SUMMARY
x-schemaName: AdminExportProductRequest
AdminExportProductResponse:
type: object
description: SUMMARY
x-schemaName: AdminExportProductResponse
required:
- transaction_id
properties:
transaction_id:
type: string
title: transaction_id
description: The product's transaction id.
AdminFile:
type: object
description: The upload's file.
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: SUMMARY
x-schemaName: AdminFileListResponse
required:
- files
properties:
files:
type: array
description: The upload's files.
items:
$ref: '#/components/schemas/AdminFile'
AdminFileResponse:
type: object
description: SUMMARY
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 fulfillment's location id.
provider_id:
type: string
title: provider_id
description: The fulfillment's provider id.
shipping_option_id:
type: string
title: shipping_option_id
description: The fulfillment's shipping option id.
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 labels.
items:
$ref: '#/components/schemas/AdminFulfillmentLabel'
packed_at:
type: string
title: packed_at
description: The fulfillment's packed at.
shipped_at:
type: string
title: shipped_at
description: The fulfillment's shipped at.
delivered_at:
type: string
title: delivered_at
description: The fulfillment's delivered at.
canceled_at:
type: string
title: canceled_at
description: The fulfillment's canceled at.
data:
type: object
description: The fulfillment's data.
metadata:
type: object
description: The fulfillment's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The fulfillment's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The fulfillment's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The fulfillment's deleted at.
AdminFulfillmentAddress:
type: object
description: The fulfillment's delivery address.
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 delivery address's ID.
fulfillment_id:
type: string
title: fulfillment_id
description: The delivery address's fulfillment id.
company:
type: string
title: company
description: The delivery address's company.
first_name:
type: string
title: first_name
description: The delivery address's first name.
last_name:
type: string
title: last_name
description: The delivery address's last name.
address_1:
type: string
title: address_1
description: The delivery address's address 1.
address_2:
type: string
title: address_2
description: The delivery address's address 2.
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.
phone:
type: string
title: phone
description: The delivery address's phone.
metadata:
type: object
description: The delivery address's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The delivery address's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The delivery address's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The delivery address's deleted at.
AdminFulfillmentItem:
type: object
description: The item's items.
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.
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 item's line item id.
inventory_item_id:
type: string
title: inventory_item_id
description: The item's inventory item id.
fulfillment_id:
type: string
title: fulfillment_id
description: The item's fulfillment id.
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.
AdminFulfillmentLabel:
type: object
description: The label's labels.
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 label url.
fulfillment_id:
type: string
title: fulfillment_id
description: The label's fulfillment id.
created_at:
type: string
format: date-time
title: created_at
description: The label's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The label's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The label's deleted at.
AdminFulfillmentProvider:
type: object
description: The fulfillment provider's fulfillment providers.
x-schemaName: AdminFulfillmentProvider
AdminFulfillmentProviderListResponse:
type: object
description: SUMMARY
x-schemaName: AdminFulfillmentProviderListResponse
required:
- limit
- offset
- count
- fulfillment_providers
properties:
limit:
type: number
title: limit
description: The fulfillment provider's limit.
offset:
type: number
title: offset
description: The fulfillment provider's offset.
count:
type: number
title: count
description: The fulfillment provider's count.
fulfillment_providers:
type: array
description: The fulfillment provider's fulfillment providers.
items:
$ref: '#/components/schemas/AdminFulfillmentProvider'
AdminFulfillmentResponse:
type: object
description: SUMMARY
x-schemaName: AdminFulfillmentResponse
required:
- fulfillment
properties:
fulfillment:
$ref: '#/components/schemas/AdminFulfillment'
AdminFulfillmentSet:
type: object
description: The fulfillment set's parent.
x-schemaName: AdminFulfillmentSet
required:
- id
- name
- type
- location
- service_zones
- created_at
- updated_at
- deleted_at
properties:
id:
type: string
title: id
description: The parent's ID.
name:
type: string
title: name
description: The parent's name.
type:
type: string
title: type
description: The parent's type.
location:
$ref: '#/components/schemas/AdminStockLocation'
service_zones:
type: array
description: The parent's service zones.
items:
$ref: '#/components/schemas/AdminServiceZone'
created_at:
type: string
format: date-time
title: created_at
description: The parent's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The parent's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The parent's deleted at.
AdminFulfillmentSetDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
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
AdminImportProductRequest:
type: object
description: SUMMARY
x-schemaName: AdminImportProductRequest
required:
- file
properties:
file:
$ref: '#/components/schemas/File'
AdminImportProductResponse:
type: object
description: SUMMARY
x-schemaName: AdminImportProductResponse
required:
- transaction_id
- summary
properties:
transaction_id:
type: string
title: transaction_id
description: The product's transaction id.
summary:
type: object
description: The product's summary.
required:
- toCreate
- toUpdate
properties:
toCreate:
type: number
title: toCreate
description: The summary's tocreate.
toUpdate:
type: number
title: toUpdate
description: The summary's toupdate.
AdminInventoryItem:
type: object
description: The inventory item's details.
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: SUMMARY
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
- raw_stocked_quantity
- reserved_quantity
- raw_reserved_quantity
- incoming_quantity
- raw_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.
raw_stocked_quantity:
type: object
description: The location level's raw stocked quantity.
reserved_quantity:
type: number
title: reserved_quantity
description: The location level's reserved quantity.
raw_reserved_quantity:
type: object
description: The location level's raw reserved quantity.
incoming_quantity:
type: number
title: incoming_quantity
description: The location level's incoming quantity.
raw_incoming_quantity:
type: object
description: The location level's raw 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: The invite's accepted.
token:
type: string
title: token
description: The invite's token.
expires_at:
type: string
title: expires_at
description: The invite's expires at.
format: date-time
metadata:
type: object
description: The invite's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The invite's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The invite's updated at.
AdminInviteResponse:
type: object
description: SUMMARY
x-schemaName: AdminInviteResponse
required:
- invite
properties:
invite:
$ref: '#/components/schemas/AdminInvite'
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: The notification's to.
channel:
type: string
title: channel
description: The notification's channel.
template:
type: string
title: template
description: The notification's template.
data:
type: object
description: The notification's data.
trigger_type:
type: string
title: trigger_type
description: The notification's trigger type.
resource_id:
type: string
title: resource_id
description: The notification's resource id.
resource_type:
type: string
title: resource_type
description: The notification's resource type.
receiver_id:
type: string
title: receiver_id
description: The notification's receiver id.
original_notification_id:
type: string
title: original_notification_id
description: The notification's original notification id.
external_id:
type: string
title: external_id
description: The notification's external id.
provider_id:
type: string
title: provider_id
description: The notification's provider id.
created_at:
type: string
format: date-time
title: created_at
description: The notification's created at.
AdminNotificationListResponse:
type: object
description: SUMMARY
x-schemaName: AdminNotificationListResponse
required:
- limit
- offset
- count
- notifications
properties:
limit:
type: number
title: limit
description: The notification's limit.
offset:
type: number
title: offset
description: The notification's offset.
count:
type: number
title: count
description: The notification's count.
notifications:
type: array
description: The notification's notifications.
items:
$ref: '#/components/schemas/AdminNotification'
AdminNotificationResponse:
type: object
description: SUMMARY
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
- id
- version
- region_id
- customer_id
- sales_channel_id
- email
- currency_code
- items
- shipping_methods
- payment_status
- fulfillment_status
- summary
- metadata
- 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/BaseOrderFulfillment'
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 order's region id.
customer_id:
type: string
title: customer_id
description: The order's customer id.
sales_channel_id:
type: string
title: sales_channel_id
description: The order's sales channel id.
email:
type: string
title: email
description: The order's email.
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.
created_at:
type: string
format: date-time
title: created_at
description: The order's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The order's updated at.
original_item_total:
type: number
title: original_item_total
description: The order's original item total.
original_item_subtotal:
type: number
title: original_item_subtotal
description: The order's original item subtotal.
original_item_tax_total:
type: number
title: original_item_tax_total
description: The order's original item tax total.
item_total:
type: number
title: item_total
description: The order's item total.
item_subtotal:
type: number
title: item_subtotal
description: The order's item subtotal.
item_tax_total:
type: number
title: item_tax_total
description: The order's item tax total.
original_total:
type: number
title: original_total
description: The order's original total.
original_subtotal:
type: number
title: original_subtotal
description: The order's original subtotal.
original_tax_total:
type: number
title: original_tax_total
description: The order's original tax total.
total:
type: number
title: total
description: The order's total.
subtotal:
type: number
title: subtotal
description: The order's subtotal.
tax_total:
type: number
title: tax_total
description: The order's tax total.
discount_total:
type: number
title: discount_total
description: The order's discount total.
discount_tax_total:
type: number
title: discount_tax_total
description: The order's discount tax total.
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 order's gift card tax total.
shipping_total:
type: number
title: shipping_total
description: The order's shipping total.
shipping_subtotal:
type: number
title: shipping_subtotal
description: The order's shipping subtotal.
shipping_tax_total:
type: number
title: shipping_tax_total
description: The order's shipping tax total.
original_shipping_total:
type: number
title: original_shipping_total
description: The order's original shipping total.
original_shipping_subtotal:
type: number
title: original_shipping_subtotal
description: The order's original shipping subtotal.
original_shipping_tax_total:
type: number
title: original_shipping_tax_total
description: The order's original shipping tax total.
AdminOrderAddress:
type: object
description: The order's billing address.
x-schemaName: AdminOrderAddress
required:
- id
- metadata
- created_at
- updated_at
properties:
country:
$ref: '#/components/schemas/AdminRegionCountry'
id:
type: string
title: id
description: The billing address's ID.
customer_id:
type: string
title: customer_id
description: The billing address's customer id.
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The billing address's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The billing address's updated at.
AdminOrderChangesResponse:
type: object
description: SUMMARY
x-schemaName: AdminOrderChangesResponse
required:
- order_changes
properties:
order_changes:
type: array
description: The order's order changes.
items:
$ref: '#/components/schemas/BaseOrderChange'
AdminOrderEditPreviewResponse:
type: object
description: SUMMARY
x-schemaName: AdminOrderEditPreviewResponse
required:
- order_preview
properties:
order_preview:
$ref: '#/components/schemas/OrderPreview'
AdminOrderEditResponse:
type: object
description: SUMMARY
x-schemaName: AdminOrderEditResponse
required:
- order_change
properties:
order_change:
$ref: '#/components/schemas/OrderChange'
AdminOrderPreview:
type: object
description: The return's order preview.
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
- metadata
- 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 order preview's return requested total.
order_change:
$ref: '#/components/schemas/BaseOrderChange'
items:
type: array
description: The order preview's items.
items:
allOf:
- 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
- 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 item's thumbnail.
variant:
$ref: '#/components/schemas/BaseProductVariant'
variant_id:
type: string
title: variant_id
description: The item's variant id.
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_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.
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 item's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The item's updated at.
metadata:
type: object
description: The item's metadata.
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.
refundable_total:
type: number
title: refundable_total
description: The item's refundable total.
refundable_total_per_unit:
type: number
title: refundable_total_per_unit
description: The item's refundable total per unit.
- type: object
description: The item's items.
properties:
actions:
type: array
description: The item's actions.
items:
type: object
description: The action's actions.
x-schemaName: BaseOrderChangeAction
shipping_methods:
type: array
description: The order preview's shipping methods.
items:
allOf:
- type: object
description: The shipping method's shipping methods.
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 shipping method's order id.
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: The shipping method's is tax inclusive.
shipping_option_id:
type: string
title: shipping_option_id
description: The shipping method's shipping option id.
data:
type: object
description: The shipping method's data.
metadata:
type: object
description: The shipping method's metadata.
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 original total.
- type: number
title: original_total
description: The shipping method's original total.
- type: string
title: original_total
description: The shipping method's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The shipping method's original subtotal.
- type: number
title: original_subtotal
description: The shipping method's original subtotal.
- type: string
title: original_subtotal
description: The shipping method's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The shipping method's original tax total.
- type: number
title: original_tax_total
description: The shipping method's original tax total.
- type: string
title: original_tax_total
description: The shipping method's original tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The shipping method's total.
- type: number
title: total
description: The shipping method's total.
- type: string
title: total
description: The shipping method's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The shipping method's subtotal.
- type: number
title: subtotal
description: The shipping method's subtotal.
- type: string
title: subtotal
description: The shipping method's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The shipping method's tax total.
- type: number
title: tax_total
description: The shipping method's tax total.
- type: string
title: tax_total
description: The shipping method's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The shipping method's discount total.
- type: number
title: discount_total
description: The shipping method's discount total.
- type: string
title: discount_total
description: The shipping method's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The shipping method's discount tax total.
- type: number
title: discount_tax_total
description: The shipping method's discount tax total.
- type: string
title: discount_tax_total
description: The shipping method's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
created_at:
type: string
format: date-time
title: created_at
description: The shipping method's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The shipping method's updated at.
- type: object
description: The shipping method's shipping methods.
properties:
actions:
type: array
description: The shipping method's actions.
items:
type: object
description: The action's actions.
x-schemaName: BaseOrderChangeAction
currency_code:
type: string
title: currency_code
description: The order preview's currency code.
id:
type: string
title: id
description: The order preview's ID.
version:
type: number
title: version
description: The order preview's version.
region_id:
type: string
title: region_id
description: The order preview's region id.
customer_id:
type: string
title: customer_id
description: The order preview's customer id.
sales_channel_id:
type: string
title: sales_channel_id
description: The order preview's sales channel id.
email:
type: string
title: email
description: The order preview's email.
format: email
display_id:
type: number
title: display_id
description: The order preview's display id.
shipping_address:
$ref: '#/components/schemas/AdminOrderAddress'
billing_address:
$ref: '#/components/schemas/AdminOrderAddress'
payment_collections:
type: array
description: The order preview's payment collections.
items:
$ref: '#/components/schemas/AdminPaymentCollection'
payment_status:
type: string
description: The order preview'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 preview's fulfillments.
items:
$ref: '#/components/schemas/BaseOrderFulfillment'
fulfillment_status:
type: string
description: The order preview's fulfillment status.
enum:
- canceled
- not_fulfilled
- partially_fulfilled
- fulfilled
- partially_shipped
- shipped
- partially_delivered
- delivered
transactions:
type: array
description: The order preview's transactions.
items:
$ref: '#/components/schemas/BaseOrderTransaction'
summary:
$ref: '#/components/schemas/BaseOrderSummary'
metadata:
type: object
description: The order preview's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The order preview's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The order preview's updated at.
original_item_total:
type: number
title: original_item_total
description: The order preview's original item total.
original_item_subtotal:
type: number
title: original_item_subtotal
description: The order preview's original item subtotal.
original_item_tax_total:
type: number
title: original_item_tax_total
description: The order preview's original item tax total.
item_total:
type: number
title: item_total
description: The order preview's item total.
item_subtotal:
type: number
title: item_subtotal
description: The order preview's item subtotal.
item_tax_total:
type: number
title: item_tax_total
description: The order preview's item tax total.
original_total:
type: number
title: original_total
description: The order preview's original total.
original_subtotal:
type: number
title: original_subtotal
description: The order preview's original subtotal.
original_tax_total:
type: number
title: original_tax_total
description: The order preview's original tax total.
total:
type: number
title: total
description: The order preview's total.
subtotal:
type: number
title: subtotal
description: The order preview's subtotal.
tax_total:
type: number
title: tax_total
description: The order preview's tax total.
discount_total:
type: number
title: discount_total
description: The order preview's discount total.
discount_tax_total:
type: number
title: discount_tax_total
description: The order preview's discount tax total.
gift_card_total:
type: number
title: gift_card_total
description: The order preview's gift card total.
gift_card_tax_total:
type: number
title: gift_card_tax_total
description: The order preview's gift card tax total.
shipping_total:
type: number
title: shipping_total
description: The order preview's shipping total.
shipping_subtotal:
type: number
title: shipping_subtotal
description: The order preview's shipping subtotal.
shipping_tax_total:
type: number
title: shipping_tax_total
description: The order preview's shipping tax total.
original_shipping_total:
type: number
title: original_shipping_total
description: The order preview's original shipping total.
original_shipping_subtotal:
type: number
title: original_shipping_subtotal
description: The order preview's original shipping subtotal.
original_shipping_tax_total:
type: number
title: original_shipping_tax_total
description: The order preview's original shipping tax total.
customer:
$ref: '#/components/schemas/AdminCustomer'
sales_channel:
$ref: '#/components/schemas/AdminSalesChannel'
AdminOrderPreviewResponse:
type: object
description: SUMMARY
x-schemaName: AdminOrderPreviewResponse
required:
- order
properties:
order:
$ref: '#/components/schemas/AdminOrderPreview'
AdminOrderResponse:
type: object
description: SUMMARY
x-schemaName: AdminOrderResponse
required:
- order
properties:
order:
$ref: '#/components/schemas/AdminOrder'
AdminOrderReturnResponse:
type: object
description: SUMMARY
x-schemaName: AdminOrderReturnResponse
required:
- order
- return
properties:
order:
$ref: '#/components/schemas/Order'
return:
$ref: '#/components/schemas/AdminReturn'
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:
oneOf:
- type: string
title: amount
description: The payment's amount.
- type: number
title: amount
description: The payment's amount.
- type: string
title: amount
description: The payment's amount.
- $ref: '#/components/schemas/IBigNumber'
authorized_amount:
oneOf:
- type: string
title: authorized_amount
description: The payment's authorized amount.
- type: number
title: authorized_amount
description: The payment's authorized amount.
- type: string
title: authorized_amount
description: The payment's authorized amount.
- $ref: '#/components/schemas/IBigNumber'
currency_code:
type: string
title: currency_code
description: The payment's currency code.
provider_id:
type: string
title: provider_id
description: The payment's provider id.
cart_id:
type: string
title: cart_id
description: The payment's cart id.
order_id:
type: string
title: order_id
description: The payment's order id.
order_edit_id:
type: string
title: order_edit_id
description: The payment's order edit id.
customer_id:
type: string
title: customer_id
description: The payment's customer id.
data:
type: object
description: The payment's data.
created_at:
type: string
format: date-time
title: created_at
description: The payment's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The payment's updated at.
captured_at:
oneOf:
- type: string
title: captured_at
description: The payment's captured at.
- type: string
title: captured_at
description: The payment's captured at.
format: date-time
canceled_at:
oneOf:
- type: string
title: canceled_at
description: The payment's canceled at.
- type: string
title: canceled_at
description: The payment's canceled at.
format: date-time
captured_amount:
oneOf:
- type: string
title: captured_amount
description: The payment's captured amount.
- type: number
title: captured_amount
description: The payment's captured amount.
- type: string
title: captured_amount
description: The payment's captured amount.
- $ref: '#/components/schemas/IBigNumber'
refunded_amount:
oneOf:
- type: string
title: refunded_amount
description: The payment's refunded amount.
- type: number
title: refunded_amount
description: The payment's refunded amount.
- type: string
title: refunded_amount
description: The payment's refunded amount.
- $ref: '#/components/schemas/IBigNumber'
captures:
type: array
description: The payment's captures.
items:
$ref: '#/components/schemas/BaseCapture'
refunds:
type: array
description: The payment's refunds.
items:
$ref: '#/components/schemas/BaseRefund'
payment_collection:
$ref: '#/components/schemas/BasePaymentCollection'
payment_session:
$ref: '#/components/schemas/BasePaymentSession'
AdminPaymentCollection:
type: object
description: The payment collection's payment collections.
x-schemaName: AdminPaymentCollection
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 payment collection's region id.
amount:
oneOf:
- type: string
title: amount
description: The payment collection's amount.
- type: number
title: amount
description: The payment collection's amount.
- type: string
title: amount
description: The payment collection's amount.
- $ref: '#/components/schemas/IBigNumber'
authorized_amount:
oneOf:
- type: string
title: authorized_amount
description: The payment collection's authorized amount.
- type: number
title: authorized_amount
description: The payment collection's authorized amount.
- type: string
title: authorized_amount
description: The payment collection's authorized amount.
- $ref: '#/components/schemas/IBigNumber'
captured_amount:
oneOf:
- type: string
title: captured_amount
description: The payment collection's captured amount.
- type: number
title: captured_amount
description: The payment collection's captured amount.
- type: string
title: captured_amount
description: The payment collection's captured amount.
- $ref: '#/components/schemas/IBigNumber'
refunded_amount:
oneOf:
- type: string
title: refunded_amount
description: The payment collection's refunded amount.
- type: number
title: refunded_amount
description: The payment collection's refunded amount.
- type: string
title: refunded_amount
description: The payment collection's refunded amount.
- $ref: '#/components/schemas/IBigNumber'
completed_at:
oneOf:
- type: string
title: completed_at
description: The payment collection's completed at.
- type: string
title: completed_at
description: The payment collection's completed at.
format: date-time
created_at:
type: string
format: date-time
title: created_at
description: The payment collection's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The payment collection's updated at.
metadata:
type: object
description: The payment collection's metadata.
status:
type: string
description: The payment collection's status.
enum:
- canceled
- not_paid
- awaiting
- authorized
- partially_authorized
payment_providers:
type: array
description: The payment collection's payment providers.
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'
AdminPaymentCollectionResponse:
type: object
description: SUMMARY
x-schemaName: AdminPaymentCollectionResponse
required:
- payment_collection
properties:
payment_collection:
$ref: '#/components/schemas/AdminPaymentCollection'
AdminPaymentProvider:
type: object
description: The payment provider's payment providers.
x-schemaName: AdminPaymentProvider
AdminPaymentResponse:
type: object
description: SUMMARY
x-schemaName: AdminPaymentResponse
required:
- payment
properties:
payment:
$ref: '#/components/schemas/AdminPayment'
AdminPostCancelClaimReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostCancelClaimReqSchema
properties:
no_notification:
type: boolean
title: no_notification
description: The claim's no notification.
AdminPostCancelExchangeReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostCancelExchangeReqSchema
properties:
no_notification:
type: boolean
title: no_notification
description: The exchange's no notification.
AdminPostCancelReturnReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostCancelReturnReqSchema
properties:
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
AdminPostClaimItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostClaimItemsReqSchema
properties:
items:
type: array
description: The claim's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
reason:
type: string
description: The item's reason.
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: The item's internal note.
AdminPostClaimsAddItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostClaimsAddItemsReqSchema
properties:
items:
type: array
description: The claim's items.
items:
type: object
description: The item's items.
required:
- variant_id
- quantity
properties:
variant_id:
type: string
title: variant_id
description: The item's variant id.
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: The item's internal note.
metadata:
type: object
description: The item's metadata.
AdminPostClaimsItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostClaimsItemsActionReqSchema
required:
- reason_id
properties:
quantity:
type: number
title: quantity
description: The claim's quantity.
reason_id:
type: string
title: reason_id
description: The claim's reason id.
internal_note:
type: string
title: internal_note
description: The claim's internal note.
AdminPostClaimsShippingActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostClaimsShippingActionReqSchema
properties:
custom_price:
type: number
title: custom_price
description: The claim's custom price.
internal_note:
type: string
title: internal_note
description: The claim's internal note.
metadata:
type: object
description: The claim's metadata.
AdminPostClaimsShippingReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostClaimsShippingReqSchema
required:
- shipping_option_id
properties:
shipping_option_id:
type: string
title: shipping_option_id
description: The claim's shipping option id.
custom_price:
type: number
title: custom_price
description: The claim's custom price.
description:
type: string
title: description
description: The claim's description.
internal_note:
type: string
title: internal_note
description: The claim's internal note.
metadata:
type: object
description: The claim's metadata.
AdminPostExchangesAddItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostExchangesAddItemsReqSchema
properties:
items:
type: array
description: The exchange's items.
items:
type: object
description: The item's items.
required:
- variant_id
- quantity
properties:
variant_id:
type: string
title: variant_id
description: The item's variant id.
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: The item's internal note.
allow_backorder:
type: boolean
title: allow_backorder
description: The item's allow backorder.
metadata:
type: object
description: The item's metadata.
AdminPostExchangesItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostExchangesItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The exchange's quantity.
internal_note:
type: string
title: internal_note
description: The exchange's internal note.
AdminPostExchangesRequestItemsReturnActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostExchangesRequestItemsReturnActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The exchange's quantity.
internal_note:
type: string
title: internal_note
description: The exchange's internal note.
reason_id:
type: string
title: reason_id
description: The exchange's reason id.
metadata:
type: object
description: The exchange's metadata.
AdminPostExchangesReturnRequestItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostExchangesReturnRequestItemsReqSchema
properties:
items:
type: array
description: The exchange's items.
items:
type: object
description: The item's items.
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: The item's internal note.
reason_id:
type: string
title: reason_id
description: The item's reason id.
metadata:
type: object
description: The item's metadata.
AdminPostExchangesShippingActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostExchangesShippingActionReqSchema
properties:
custom_price:
type: number
title: custom_price
description: The exchange's custom price.
internal_note:
type: string
title: internal_note
description: The exchange's internal note.
metadata:
type: object
description: The exchange's metadata.
AdminPostExchangesShippingReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostExchangesShippingReqSchema
required:
- shipping_option_id
properties:
shipping_option_id:
type: string
title: shipping_option_id
description: The exchange's shipping option id.
custom_price:
type: number
title: custom_price
description: The exchange's custom price.
description:
type: string
title: description
description: The exchange's description.
internal_note:
type: string
title: internal_note
description: The exchange's internal note.
metadata:
type: object
description: The exchange's metadata.
AdminPostOrderClaimsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostOrderClaimsReqSchema
required:
- type
- order_id
- reason_id
- metadata
properties:
type:
type: string
description: The claim's type.
enum:
- refund
- replace
order_id:
type: string
title: order_id
description: The claim's order id.
description:
type: string
title: description
description: The claim's description.
internal_note:
type: string
title: internal_note
description: The claim's internal note.
reason_id:
type: string
title: reason_id
description: The claim's reason id.
metadata:
type: object
description: The claim's metadata.
AdminPostOrderEditsAddItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostOrderEditsAddItemsReqSchema
properties:
items:
type: array
description: The order edit's items.
items:
type: object
description: The item's items.
required:
- variant_id
- quantity
properties:
variant_id:
type: string
title: variant_id
description: The item's variant id.
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: The item's internal note.
allow_backorder:
type: boolean
title: allow_backorder
description: The item's allow backorder.
metadata:
type: object
description: The item's metadata.
AdminPostOrderEditsItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostOrderEditsItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The order edit's quantity.
internal_note:
type: string
title: internal_note
description: The order edit's internal note.
AdminPostOrderEditsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostOrderEditsReqSchema
required:
- order_id
- metadata
properties:
order_id:
type: string
title: order_id
description: The order edit's order id.
description:
type: string
title: description
description: The order edit's description.
internal_note:
type: string
title: internal_note
description: The order edit's internal note.
metadata:
type: object
description: The order edit's metadata.
AdminPostOrderEditsShippingActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostOrderEditsShippingActionReqSchema
properties:
custom_price:
type: number
title: custom_price
description: The order edit's custom price.
internal_note:
type: string
title: internal_note
description: The order edit's internal note.
metadata:
type: object
description: The order edit's metadata.
AdminPostOrderEditsShippingReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostOrderEditsShippingReqSchema
required:
- shipping_option_id
properties:
shipping_option_id:
type: string
title: shipping_option_id
description: The order edit's shipping option id.
custom_price:
type: number
title: custom_price
description: The order edit's custom price.
description:
type: string
title: description
description: The order edit's description.
internal_note:
type: string
title: internal_note
description: The order edit's internal note.
metadata:
type: object
description: The order edit's metadata.
AdminPostOrderEditsUpdateItemQuantityReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostOrderEditsUpdateItemQuantityReqSchema
required:
- quantity
properties:
quantity:
type: number
title: quantity
description: The order edit's quantity.
internal_note:
type: string
title: internal_note
description: The order edit's internal note.
AdminPostOrderExchangesReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostOrderExchangesReqSchema
required:
- order_id
- metadata
properties:
order_id:
type: string
title: order_id
description: The exchange's order id.
description:
type: string
title: description
description: The exchange's description.
internal_note:
type: string
title: internal_note
description: The exchange's internal note.
metadata:
type: object
description: The exchange's metadata.
AdminPostReceiveReturnsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReceiveReturnsReqSchema
required:
- metadata
properties:
internal_note:
type: string
title: internal_note
description: The return's internal note.
description:
type: string
title: description
description: The return's description.
metadata:
type: object
description: The return's metadata.
AdminPostReturnsConfirmRequestReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsConfirmRequestReqSchema
properties:
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
AdminPostReturnsDismissItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsDismissItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
AdminPostReturnsReceiveItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReceiveItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
AdminPostReturnsReceiveItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReceiveItemsReqSchema
properties:
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
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: The item's internal note.
AdminPostReturnsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReqSchema
required:
- order_id
- metadata
properties:
order_id:
type: string
title: order_id
description: The return's order id.
location_id:
type: string
title: location_id
description: The return's location id.
description:
type: string
title: description
description: The return's description.
internal_note:
type: string
title: internal_note
description: The return's internal note.
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
metadata:
type: object
description: The return's metadata.
AdminPostReturnsRequestItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsRequestItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The claim's quantity.
internal_note:
type: string
title: internal_note
description: The claim's internal note.
reason_id:
type: string
title: reason_id
description: The claim's reason id.
metadata:
type: object
description: The claim's metadata.
AdminPostReturnsRequestItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsRequestItemsReqSchema
properties:
items:
type: array
description: The claim's items.
items:
type: object
description: The item's items.
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: The item's internal note.
reason_id:
type: string
title: reason_id
description: The item's reason id.
metadata:
type: object
description: The item's metadata.
AdminPostReturnsReturnReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReturnReqSchema
required:
- metadata
properties:
location_id:
type: string
title: location_id
description: The return's location id.
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
metadata:
type: object
description: The return's metadata.
AdminPostReturnsShippingActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsShippingActionReqSchema
properties:
custom_price:
type: number
title: custom_price
description: The return's custom price.
internal_note:
type: string
title: internal_note
description: The return's internal note.
metadata:
type: object
description: The return's metadata.
AdminPostReturnsShippingReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsShippingReqSchema
required:
- shipping_option_id
properties:
shipping_option_id:
type: string
title: shipping_option_id
description: The exchange's shipping option id.
custom_price:
type: number
title: custom_price
description: The exchange's custom price.
description:
type: string
title: description
description: The exchange's description.
internal_note:
type: string
title: internal_note
description: The exchange's internal note.
metadata:
type: object
description: The exchange's metadata.
AdminPrice:
type: object
description: The price's prices.
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.
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 price's min quantity.
max_quantity:
type: number
title: max_quantity
description: The price's max quantity.
price_set_id:
type: string
title: price_set_id
description: The price's price set id.
created_at:
type: string
format: date-time
title: created_at
description: The price's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The price's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The price's deleted at.
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 price list's starts at.
ends_at:
type: string
title: ends_at
description: The price list's ends at.
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 price list's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The price list's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The price list's deleted at.
AdminPriceListBatchResponse:
type: object
description: SUMMARY
x-schemaName: AdminPriceListBatchResponse
required:
- created
- updated
- deleted
properties:
created:
type: array
description: The price list's created.
items:
$ref: '#/components/schemas/AdminPrice'
updated:
type: array
description: The price list's updated.
items:
$ref: '#/components/schemas/AdminPrice'
deleted:
type: object
description: SUMMARY
required:
- ids
- object
- deleted
properties:
ids:
type: array
description: The deleted's ids.
items:
type: string
title: ids
description: The id's ids.
object:
type: string
title: object
description: SUMMARY
deleted:
type: boolean
title: deleted
description: SUMMARY
AdminPriceListDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminPriceListListResponse
required:
- limit
- offset
- count
- price_lists
properties:
limit:
type: number
title: limit
description: The price list's limit.
offset:
type: number
title: offset
description: The price list's offset.
count:
type: number
title: count
description: The price list's count.
price_lists:
type: array
description: The price list's price lists.
items:
$ref: '#/components/schemas/AdminPriceList'
AdminPriceListPrice:
type: object
description: The price's prices.
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 price's variant id.
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.
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 price's min quantity.
max_quantity:
type: number
title: max_quantity
description: The price's max quantity.
price_set_id:
type: string
title: price_set_id
description: The price's price set id.
created_at:
type: string
format: date-time
title: created_at
description: The price's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The price's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The price's deleted at.
AdminPriceListResponse:
type: object
description: SUMMARY
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.
value:
type: string
title: value
description: The price preference's value.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The price preference's is tax inclusive.
created_at:
type: string
format: date-time
title: created_at
description: The price preference's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The price preference's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The price preference's deleted at.
AdminPricePreferenceDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminPricePreferenceListResponse
required:
- limit
- offset
- count
- price_preferences
properties:
limit:
type: number
title: limit
description: The price preference's limit.
offset:
type: number
title: offset
description: The price preference's offset.
count:
type: number
title: count
description: The price preference's count.
price_preferences:
type: array
description: The price preference's price preferences.
items:
$ref: '#/components/schemas/AdminPricePreference'
AdminPricePreferenceResponse:
type: object
description: SUMMARY
x-schemaName: AdminPricePreferenceResponse
required:
- price_preference
properties:
price_preference:
$ref: '#/components/schemas/AdminPricePreference'
AdminProduct:
type: object
description: The product's parent.
x-schemaName: AdminProduct
required:
- type
- length
- title
- status
- options
- description
- id
- created_at
- updated_at
- handle
- subtitle
- is_giftcard
- thumbnail
- width
- weight
- height
- origin_country
- hs_code
- mid_code
- material
- collection_id
- type_id
- images
- discountable
- external_id
- deleted_at
properties:
collection:
$ref: '#/components/schemas/AdminCollection'
categories:
type: array
description: The parent's categories.
items:
$ref: '#/components/schemas/AdminProductCategory'
sales_channels:
type: array
description: The parent's sales channels.
items:
$ref: '#/components/schemas/AdminSalesChannel'
variants:
type: array
description: The parent's variants.
items:
$ref: '#/components/schemas/AdminProductVariant'
type:
$ref: '#/components/schemas/AdminProductType'
tags:
type: array
description: The parent's tags.
items:
$ref: '#/components/schemas/AdminProductTag'
length:
type: number
title: length
description: The parent's length.
title:
type: string
title: title
description: The parent's title.
status:
type: string
description: The parent's status.
enum:
- draft
- proposed
- published
- rejected
options:
type: array
description: The parent's options.
items:
$ref: '#/components/schemas/BaseProductOption'
description:
type: string
title: description
description: The parent's description.
id:
type: string
title: id
description: The parent's ID.
metadata:
type: object
description: The parent's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The parent's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The parent's updated at.
handle:
type: string
title: handle
description: The parent's handle.
subtitle:
type: string
title: subtitle
description: The parent's subtitle.
is_giftcard:
type: boolean
title: is_giftcard
description: The parent's is giftcard.
thumbnail:
type: string
title: thumbnail
description: The parent's thumbnail.
width:
type: number
title: width
description: The parent's width.
weight:
type: number
title: weight
description: The parent's weight.
height:
type: number
title: height
description: The parent's height.
origin_country:
type: string
title: origin_country
description: The parent's origin country.
hs_code:
type: string
title: hs_code
description: The parent's hs code.
mid_code:
type: string
title: mid_code
description: The parent's mid code.
material:
type: string
title: material
description: The parent's material.
collection_id:
type: string
title: collection_id
description: The parent's collection id.
type_id:
type: string
title: type_id
description: The parent's type id.
images:
type: array
description: The parent's images.
items:
$ref: '#/components/schemas/BaseProductImage'
discountable:
type: boolean
title: discountable
description: The parent's discountable.
external_id:
type: string
title: external_id
description: The parent's external id.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The parent's deleted at.
AdminProductCategory:
type: object
description: The category's categories.
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 category 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.
created_at:
type: string
format: date-time
title: created_at
description: The category's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The category's updated at.
handle:
type: string
title: handle
description: The category's handle.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The category's deleted at.
is_active:
type: boolean
title: is_active
description: The category's is active.
is_internal:
type: boolean
title: is_internal
description: The category's is internal.
rank:
type: number
title: rank
description: The category's rank.
parent_category_id:
type: string
title: parent_category_id
description: The category's parent category id.
AdminProductCategoryDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminProductCategoryListResponse
required:
- limit
- offset
- count
- product_categories
properties:
limit:
type: number
title: limit
description: The product category's limit.
offset:
type: number
title: offset
description: The product category's offset.
count:
type: number
title: count
description: The product category's count.
product_categories:
type: array
description: The product category's product categories.
items:
$ref: '#/components/schemas/AdminProductCategory'
AdminProductCategoryResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductCategoryResponse
required:
- product_category
properties:
product_category:
$ref: '#/components/schemas/AdminProductCategory'
AdminProductDeleteResponse:
type: object
description: SUMMARY
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.
AdminProductOption:
type: object
description: The product's product option.
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:
$ref: '#/components/schemas/BaseProduct'
product_id:
type: string
title: product_id
description: The product option's product id.
values:
type: array
description: The product option's values.
items:
$ref: '#/components/schemas/BaseProductOptionValue'
metadata:
type: object
description: The product option's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The product option's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The product option's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The product option's deleted at.
AdminProductOptionDeleteResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductOptionDeleteResponse
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.
deleted:
type: boolean
title: deleted
description: Whether the Product was deleted.
parent:
$ref: '#/components/schemas/AdminProduct'
AdminProductOptionResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductOptionResponse
required:
- product_option
properties:
product_option:
$ref: '#/components/schemas/AdminProductOption'
AdminProductResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductResponse
required:
- product
properties:
product:
$ref: '#/components/schemas/AdminProduct'
AdminProductTag:
type: object
description: The tag's tags.
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 tag's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The tag's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The tag's deleted at.
metadata:
type: object
description: The tag's metadata.
AdminProductTagDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminProductTagListResponse
required:
- limit
- offset
- count
- product_tags
properties:
limit:
type: number
title: limit
description: The product tag's limit.
offset:
type: number
title: offset
description: The product tag's offset.
count:
type: number
title: count
description: The product tag's count.
product_tags:
type: array
description: The product tag's product tags.
items:
$ref: '#/components/schemas/AdminProductTag'
AdminProductTagResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductTagResponse
required:
- product_tag
properties:
product_tag:
$ref: '#/components/schemas/AdminProductTag'
AdminProductType:
type: object
description: The parent's type.
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 type's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The type's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The type's deleted at.
metadata:
type: object
description: The type's metadata.
AdminProductTypeDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminProductTypeListResponse
required:
- limit
- offset
- count
- product_types
properties:
limit:
type: number
title: limit
description: The product type's limit.
offset:
type: number
title: offset
description: The product type's offset.
count:
type: number
title: count
description: The product type's count.
product_types:
type: array
description: The product type's product types.
items:
$ref: '#/components/schemas/AdminProductType'
AdminProductTypeResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductTypeResponse
required:
- product_type
properties:
product_type:
$ref: '#/components/schemas/AdminProductType'
AdminProductVariant:
type: object
description: The product's parent.
x-schemaName: AdminProductVariant
required:
- prices
- 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:
prices:
type: array
description: The parent's prices.
items:
$ref: '#/components/schemas/AdminPrice'
id:
type: string
title: id
description: The parent's ID.
title:
type: string
title: title
description: The parent's title.
sku:
type: string
title: sku
description: The parent's sku.
barcode:
type: string
title: barcode
description: The parent's barcode.
ean:
type: string
title: ean
description: The parent's ean.
upc:
type: string
title: upc
description: The parent's upc.
allow_backorder:
type: boolean
title: allow_backorder
description: The parent's allow backorder.
manage_inventory:
type: boolean
title: manage_inventory
description: The parent's manage inventory.
hs_code:
type: string
title: hs_code
description: The parent's hs code.
origin_country:
type: string
title: origin_country
description: The parent's origin country.
mid_code:
type: string
title: mid_code
description: The parent's mid code.
material:
type: string
title: material
description: The parent's material.
weight:
type: number
title: weight
description: The parent's weight.
length:
type: number
title: length
description: The parent's length.
height:
type: number
title: height
description: The parent's height.
width:
type: number
title: width
description: The parent's width.
variant_rank:
type: number
title: variant_rank
description: The parent's variant rank.
options:
type: array
description: The parent's options.
items:
$ref: '#/components/schemas/BaseProductOptionValue'
product:
$ref: '#/components/schemas/BaseProduct'
product_id:
type: string
title: product_id
description: The parent's product id.
calculated_price:
$ref: '#/components/schemas/BaseCalculatedPriceSet'
created_at:
type: string
format: date-time
title: created_at
description: The parent's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The parent's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The parent's deleted at.
metadata:
type: object
description: The parent's metadata.
AdminProductVariantDeleteResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductVariantDeleteResponse
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.
deleted:
type: boolean
title: deleted
description: Whether the Product was deleted.
parent:
$ref: '#/components/schemas/AdminProduct'
AdminProductVariantInventoryBatchResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductVariantInventoryBatchResponse
required:
- created
- updated
- deleted
properties:
created:
oneOf:
- $ref: '#/components/schemas/AdminProductVariantInventoryLink'
- type: array
description: The product's created.
items:
type: object
description: The created's details.
x-schemaName: AdminProductVariantInventoryLink
required:
- productService
- inventoryService
properties:
productService:
type: object
description: The created's productservice.
required:
- variant_id
properties:
variant_id:
type: string
title: variant_id
description: The productservice's variant id.
inventoryService:
type: object
description: The created's inventoryservice.
required:
- inventory_item_id
properties:
inventory_item_id:
type: string
title: inventory_item_id
description: The inventoryservice's inventory item id.
updated:
oneOf:
- $ref: '#/components/schemas/AdminProductVariantInventoryLink'
- type: array
description: The product's updated.
items:
type: object
description: The updated's details.
x-schemaName: AdminProductVariantInventoryLink
required:
- productService
- inventoryService
properties:
productService:
type: object
description: The updated's productservice.
required:
- variant_id
properties:
variant_id:
type: string
title: variant_id
description: The productservice's variant id.
inventoryService:
type: object
description: The updated's inventoryservice.
required:
- inventory_item_id
properties:
inventory_item_id:
type: string
title: inventory_item_id
description: The inventoryservice's inventory item id.
deleted:
oneOf:
- $ref: '#/components/schemas/AdminProductVariantInventoryLink'
- type: array
description: SUMMARY
items:
type: object
description: SUMMARY
x-schemaName: AdminProductVariantInventoryLink
required:
- productService
- inventoryService
properties:
productService:
type: object
description: The deleted's productservice.
required:
- variant_id
properties:
variant_id:
type: string
title: variant_id
description: The productservice's variant id.
inventoryService:
type: object
description: The deleted's inventoryservice.
required:
- inventory_item_id
properties:
inventory_item_id:
type: string
title: inventory_item_id
description: The inventoryservice's inventory item id.
AdminProductVariantInventoryLink:
type: object
description: The product's ID.
x-schemaName: AdminProductVariantInventoryLink
required:
- productService
- inventoryService
properties:
productService:
type: object
description: The id's productservice.
required:
- variant_id
properties:
variant_id:
type: string
title: variant_id
description: The productservice's variant id.
inventoryService:
type: object
description: The id's inventoryservice.
required:
- inventory_item_id
properties:
inventory_item_id:
type: string
title: inventory_item_id
description: The inventoryservice's inventory item id.
AdminProductVariantInventoryLinkDeleteResponse:
type: object
description: SUMMARY
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.
deleted:
type: boolean
title: deleted
description: Whether the Product was deleted.
parent:
$ref: '#/components/schemas/AdminProductVariant'
AdminProductVariantParams:
type: object
description: SUMMARY
x-schemaName: AdminProductVariantParams
properties:
q:
type: string
title: q
description: The product's q.
id:
oneOf:
- type: string
title: id
description: The product's ID.
- type: array
description: The product's ID.
items:
type: string
title: id
description: The id's ID.
manage_inventory:
type: boolean
title: manage_inventory
description: The product's manage inventory.
allow_backorder:
type: boolean
title: allow_backorder
description: The product's allow backorder.
created_at:
type: object
description: The product's created at.
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.
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`).
- 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: The product's updated at.
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.
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`).
- 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: The product's deleted at.
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.
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`).
- 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`).
limit:
type: number
title: limit
description: The product's limit.
offset:
type: number
title: offset
description: The product's offset.
order:
type: string
title: order
description: The product's order.
fields:
type: string
title: fields
description: The product's fields.
$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
AdminProductVariantResponse:
type: object
description: SUMMARY
x-schemaName: AdminProductVariantResponse
required:
- variant
properties:
variant:
$ref: '#/components/schemas/AdminProductVariant'
AdminPromotion:
type: object
description: The promotion's details.
x-schemaName: AdminPromotion
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
code:
type: string
title: code
description: The promotion's code.
type:
type: string
description: The promotion's type.
enum:
- standard
- buyget
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
application_method:
$ref: '#/components/schemas/BaseApplicationMethod'
rules:
type: array
description: The promotion's rules.
items:
$ref: '#/components/schemas/BasePromotionRule'
campaign_id:
type: string
title: campaign_id
description: The promotion's campaign id.
campaign:
$ref: '#/components/schemas/AdminCampaign'
AdminPromotionResponse:
type: object
description: SUMMARY
x-schemaName: AdminPromotionResponse
required:
- promotion
properties:
promotion:
$ref: '#/components/schemas/AdminPromotion'
AdminPromotionRule:
type: object
description: The updated's details.
x-schemaName: AdminPromotionRule
required:
- id
- values
properties:
id:
type: string
title: id
description: The updated's ID.
description:
type: string
title: description
description: The updated's description.
attribute:
type: string
title: attribute
description: The updated's attribute.
operator:
type: string
description: The updated's operator.
enum:
- gt
- lt
- eq
- ne
- in
- lte
- gte
values:
type: array
description: The updated's values.
items:
$ref: '#/components/schemas/BasePromotionRuleValue'
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.
created_at:
type: string
format: date-time
title: created_at
description: The refund reason's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The refund reason's updated at.
AdminRegion:
type: object
description: The region's details.
x-schemaName: AdminRegion
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.
AdminRegionCountry:
type: object
description: The billing address's country.
x-schemaName: AdminRegionCountry
AdminRegionResponse:
type: object
description: SUMMARY
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
- inventory_item
properties:
id:
type: string
title: id
description: The reservation's ID.
line_item_id:
type: string
title: line_item_id
description: The reservation's line item id.
location_id:
type: string
title: location_id
description: The reservation's location id.
quantity:
type: number
title: quantity
description: The reservation's quantity.
external_id:
type: string
title: external_id
description: The reservation's external id.
description:
type: string
title: description
description: The reservation's description.
inventory_item_id:
type: string
title: inventory_item_id
description: The reservation's inventory item id.
inventory_item:
type: object
description: The reservation's inventory item.
metadata:
type: object
description: The reservation's metadata.
created_by:
type: string
title: created_by
description: The reservation's created by.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The reservation's deleted at.
created_at:
type: string
format: date-time
title: created_at
description: The reservation's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The reservation's updated at.
AdminReservationResponse:
type: object
description: SUMMARY
x-schemaName: AdminReservationResponse
required:
- reservation
properties:
reservation:
$ref: '#/components/schemas/AdminReservation'
AdminReturn:
type: object
description: The exchange's return.
x-schemaName: AdminReturn
required:
- id
- order_id
- order_version
- display_id
- items
- received_at
- created_at
- canceled_at
properties:
id:
type: string
title: id
description: The return's ID.
order_id:
type: string
title: order_id
description: The return's order id.
status:
type: string
title: status
description: The return's status.
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: The return's no notification.
refund_amount:
type: number
title: refund_amount
description: The return's refund amount.
items:
type: array
description: The return's items.
items:
$ref: '#/components/schemas/BaseReturnItem'
received_at:
type: string
title: received_at
description: The return's received at.
created_at:
type: string
format: date-time
title: created_at
description: The return's created at.
canceled_at:
type: string
title: canceled_at
description: The return's canceled at.
AdminReturnItem:
type: object
description: The return item's return items.
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 return item's received quantity.
damaged_quantity:
type: number
title: damaged_quantity
description: The return item's damaged quantity.
reason_id:
type: string
title: reason_id
description: The return item's reason id.
note:
type: string
title: note
description: The return item's note.
item_id:
type: string
title: item_id
description: The return item's item id.
return_id:
type: string
title: return_id
description: The return item's return id.
metadata:
type: object
description: The return item's metadata.
AdminReturnPreviewResponse:
type: object
description: SUMMARY
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.
created_at:
type: string
format: date-time
title: created_at
description: The return reason's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The return reason's updated at.
AdminReturnReasonDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminReturnReasonListResponse
required:
- limit
- offset
- count
- return_reasons
properties:
limit:
type: number
title: limit
description: The return reason's limit.
offset:
type: number
title: offset
description: The return reason's offset.
count:
type: number
title: count
description: The return reason's count.
return_reasons:
type: array
description: The return reason's return reasons.
items:
$ref: '#/components/schemas/AdminReturnReason'
AdminReturnReasonResponse:
type: object
description: SUMMARY
x-schemaName: AdminReturnReasonResponse
required:
- return_reason
properties:
return_reason:
$ref: '#/components/schemas/AdminReturnReason'
AdminReturnResponse:
type: object
description: SUMMARY
x-schemaName: AdminReturnResponse
required:
- return
properties:
return:
$ref: '#/components/schemas/AdminReturn'
AdminRevokeApiKey:
type: object
description: SUMMARY
x-schemaName: AdminRevokeApiKey
properties:
revoke_in:
type: number
title: revoke_in
description: The api key's revoke in.
AdminRuleAttributeOption:
type: object
description: The attribute's attributes.
x-schemaName: AdminRuleAttributeOption
required:
- id
- value
- label
- field_type
- required
- disguised
- operators
properties:
id:
type: string
title: id
description: The attribute's ID.
value:
type: string
title: value
description: The attribute's value.
label:
type: string
title: label
description: The attribute's label.
field_type:
type: string
title: field_type
description: The attribute's field type.
required:
type: boolean
title: required
description: The attribute's required.
disguised:
type: boolean
title: disguised
description: The attribute's disguised.
operators:
type: array
description: The attribute's operators.
items:
$ref: '#/components/schemas/BaseRuleOperatorOptions'
AdminRuleValueOption:
type: object
description: The value's values.
x-schemaName: AdminRuleValueOption
required:
- id
- value
- label
properties:
id:
type: string
title: id
description: The value's ID.
value:
type: string
title: value
description: The value's details.
label:
type: string
title: label
description: The value's label.
AdminSalesChannel:
type: object
description: The order's sales channel.
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: The sales channel's is disabled.
metadata:
type: object
description: The sales channel's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The sales channel's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The sales channel's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The sales channel's deleted at.
AdminSalesChannelDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminSalesChannelResponse
required:
- sales_channel
properties:
sales_channel:
$ref: '#/components/schemas/AdminSalesChannel'
AdminServiceZone:
type: object
description: The service zone's service zones.
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: SUMMARY
x-schemaName: AdminServiceZoneDeleteResponse
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.
deleted:
type: boolean
title: deleted
description: Whether the Fulfillment Set was deleted.
parent:
$ref: '#/components/schemas/AdminFulfillmentSet'
AdminServiceZoneResponse:
type: object
description: SUMMARY
x-schemaName: AdminServiceZoneResponse
required:
- service_zone
properties:
service_zone:
$ref: '#/components/schemas/AdminServiceZone'
AdminShippingOption:
type: object
description: The shipping option's shipping options.
x-schemaName: AdminShippingOption
AdminShippingOptionDeleteResponse:
type: object
description: SUMMARY
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.
AdminShippingOptionResponse:
type: object
description: SUMMARY
x-schemaName: AdminShippingOptionResponse
required:
- shipping_option
properties:
shipping_option:
$ref: '#/components/schemas/AdminShippingOption'
AdminShippingOptionRule:
type: object
description: The updated'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 updated's ID.
attribute:
type: string
title: attribute
description: The updated's attribute.
operator:
type: string
title: operator
description: The updated's operator.
value:
oneOf:
- type: string
title: value
description: The updated's value.
- type: array
description: The updated's value.
items:
type: string
title: value
description: The value's details.
shipping_option_id:
type: string
title: shipping_option_id
description: The updated's shipping option id.
created_at:
type: string
format: date-time
title: created_at
description: The updated's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The updated's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The updated's deleted at.
AdminShippingProfile:
type: object
description: The shipping option's shipping profile.
x-schemaName: AdminShippingProfile
AdminShippingProfileDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminShippingProfileResponse
required:
- shipping_profile
properties:
shipping_profile:
$ref: '#/components/schemas/AdminShippingProfile'
AdminStockLocation:
type: object
description: The parent's location.
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 location's address id.
address:
$ref: '#/components/schemas/AdminStockLocationAddress'
sales_channels:
type: array
description: The location's sales channels.
items:
$ref: '#/components/schemas/AdminSalesChannel'
fulfillment_providers:
type: array
description: The location's fulfillment providers.
items:
$ref: '#/components/schemas/AdminFulfillmentProvider'
fulfillment_sets:
type: array
description: The location's fulfillment sets.
items:
type: object
AdminStockLocationAddress:
type: object
description: The location's address.
x-schemaName: AdminStockLocationAddress
AdminStockLocationDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminStockLocationListResponse
required:
- limit
- offset
- count
- stock_locations
properties:
limit:
type: number
title: limit
description: The stock location's limit.
offset:
type: number
title: offset
description: The stock location's offset.
count:
type: number
title: count
description: The stock location's count.
stock_locations:
type: array
description: The stock location's stock locations.
items:
$ref: '#/components/schemas/AdminStockLocation'
AdminStockLocationResponse:
type: object
description: SUMMARY
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 store's default sales channel id.
default_region_id:
type: string
title: default_region_id
description: The store's default region id.
default_location_id:
type: string
title: default_location_id
description: The store's default location id.
metadata:
type: object
description: The store's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The store's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The store's updated at.
AdminStoreCurrency:
type: object
description: The supported currency's supported currencies.
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 supported currency's ID.
currency_code:
type: string
title: currency_code
description: The supported currency's currency code.
store_id:
type: string
title: store_id
description: The supported currency's store id.
is_default:
type: boolean
title: is_default
description: The supported currency's is default.
currency:
$ref: '#/components/schemas/AdminCurrency'
created_at:
type: string
format: date-time
title: created_at
description: The supported currency's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The supported currency's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The supported currency's deleted at.
AdminStoreListResponse:
type: object
description: SUMMARY
x-schemaName: AdminStoreListResponse
required:
- limit
- offset
- count
- stores
properties:
limit:
type: number
title: limit
description: The store's limit.
offset:
type: number
title: offset
description: The store's offset.
count:
type: number
title: count
description: The store's count.
stores:
type: array
description: The store's stores.
items:
$ref: '#/components/schemas/AdminStore'
AdminStoreResponse:
type: object
description: SUMMARY
x-schemaName: AdminStoreResponse
required:
- store
properties:
store:
$ref: '#/components/schemas/AdminStore'
AdminTaxRate:
type: object
description: The tax rate's parent.
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 parent's ID.
rate:
type: number
title: rate
description: The parent's rate.
code:
type: string
title: code
description: The parent's code.
name:
type: string
title: name
description: The parent's name.
metadata:
type: object
description: The parent's metadata.
tax_region_id:
type: string
title: tax_region_id
description: The parent's tax region id.
is_combinable:
type: boolean
title: is_combinable
description: The parent's is combinable.
is_default:
type: boolean
title: is_default
description: The parent's is default.
created_at:
type: string
format: date-time
title: created_at
description: The parent's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The parent's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The parent's deleted at.
created_by:
type: string
title: created_by
description: The parent's created by.
tax_region:
$ref: '#/components/schemas/AdminTaxRegion'
rules:
type: array
description: The parent's rules.
items:
$ref: '#/components/schemas/AdminTaxRateRule'
AdminTaxRateDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminTaxRateResponse
required:
- tax_rate
properties:
tax_rate:
$ref: '#/components/schemas/AdminTaxRate'
AdminTaxRateRule:
type: object
description: The rule's rules.
x-schemaName: AdminTaxRateRule
required:
- reference
- reference_id
properties:
reference:
type: string
title: reference
description: The rule's reference.
reference_id:
type: string
title: reference_id
description: The rule's reference id.
AdminTaxRegion:
type: object
description: The parent's tax region.
x-schemaName: AdminTaxRegion
required:
- id
- rate
- code
- country_code
- province_code
- name
- metadata
- tax_region_id
- is_combinable
- is_default
- 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.
rate:
type: number
title: rate
description: The tax region's rate.
code:
type: string
title: code
description: The tax region's code.
country_code:
type: string
title: country_code
description: The tax region's country code.
province_code:
type: string
title: province_code
description: The tax region's province code.
name:
type: string
title: name
description: The tax region's name.
metadata:
type: object
description: The tax region's metadata.
tax_region_id:
type: string
title: tax_region_id
description: The tax region's tax region id.
is_combinable:
type: boolean
title: is_combinable
description: The tax region's is combinable.
is_default:
type: boolean
title: is_default
description: The tax region's is default.
parent_id:
type: string
title: parent_id
description: The tax region's parent id.
created_at:
type: string
format: date-time
title: created_at
description: The tax region's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The tax region's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The tax region's deleted at.
created_by:
type: string
title: created_by
description: The tax region's created by.
tax_rates:
type: array
description: The tax region's tax rates.
items:
type: object
parent:
type: object
children:
type: array
description: The tax region's children.
items:
type: object
AdminTaxRegionDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminTaxRegionResponse
required:
- tax_region
properties:
tax_region:
$ref: '#/components/schemas/AdminTaxRegion'
AdminUpdateApiKey:
type: object
description: SUMMARY
x-schemaName: AdminUpdateApiKey
required:
- title
properties:
title:
type: string
title: title
description: The api key's title.
AdminUpdateCollection:
type: object
description: SUMMARY
x-schemaName: AdminUpdateCollection
required:
- metadata
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.
AdminUpdateCustomerGroup:
type: object
description: SUMMARY
x-schemaName: AdminUpdateCustomerGroup
required:
- metadata
properties:
name:
type: string
title: name
description: The customer group's name.
metadata:
type: object
description: The customer group's metadata.
AdminUpdatePriceList:
type: object
description: SUMMARY
x-schemaName: AdminUpdatePriceList
required:
- description
- starts_at
- ends_at
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 price list's starts at.
ends_at:
type: string
title: ends_at
description: The price list's ends at.
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.
AdminUpdatePricePreference:
type: object
description: SUMMARY
x-schemaName: AdminUpdatePricePreference
properties:
attribute:
type: string
title: attribute
description: The price preference's attribute.
value:
type: string
title: value
description: The price preference's value.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The price preference's is tax inclusive.
AdminUpdateProduct:
type: object
description: The update's details.
x-schemaName: AdminUpdateProduct
properties:
title:
type: string
title: title
description: The update's title.
subtitle:
type: string
title: subtitle
description: The update's subtitle.
description:
type: string
title: description
description: The update's description.
is_giftcard:
type: boolean
title: is_giftcard
description: The update's is giftcard.
discountable:
type: boolean
title: discountable
description: The update's discountable.
images:
type: array
description: The update's images.
items:
type: object
description: The image's images.
required:
- url
properties:
url:
type: string
title: url
description: The image's url.
thumbnail:
type: string
title: thumbnail
description: The update's thumbnail.
handle:
type: string
title: handle
description: The update's handle.
status:
type: string
description: The update's status.
enum:
- draft
- proposed
- published
- rejected
type_id:
type: string
title: type_id
description: The update's type id.
collection_id:
type: string
title: collection_id
description: The update's collection id.
categories:
type: array
description: The update's categories.
items:
type: object
description: The category's categories.
required:
- id
properties:
id:
type: string
title: id
description: The category's ID.
tags:
type: array
description: The update's tags.
items:
type: object
description: The tag's tags.
required:
- id
properties:
id:
type: string
title: id
description: The tag's ID.
options:
type: array
description: The update's options.
items:
$ref: '#/components/schemas/AdminUpdateProductOption'
variants:
type: array
description: The update's variants.
items:
oneOf:
- type: object
description: The variant's variants.
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: The variant's allow backorder.
manage_inventory:
type: boolean
title: manage_inventory
description: The variant's manage inventory.
variant_rank:
type: number
title: variant_rank
description: The variant's variant rank.
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.
prices:
type: array
description: The variant's prices.
items:
$ref: '#/components/schemas/AdminCreateProductVariantPrice'
options:
type: object
description: The variant's options.
- type: object
description: The variant's variants.
x-schemaName: AdminUpdateProductVariant
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: The variant's allow backorder.
manage_inventory:
type: boolean
title: manage_inventory
description: The variant's manage inventory.
variant_rank:
type: number
title: variant_rank
description: The variant's variant rank.
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.
prices:
type: array
description: The variant's prices.
items:
$ref: '#/components/schemas/AdminCreateProductVariantPrice'
options:
type: object
description: The variant's options.
sales_channels:
type: array
description: The update's sales channels.
items:
type: object
description: The sales channel's sales channels.
required:
- id
properties:
id:
type: string
title: id
description: The sales channel's ID.
weight:
type: number
title: weight
description: The update's weight.
length:
type: number
title: length
description: The update's length.
height:
type: number
title: height
description: The update's height.
width:
type: number
title: width
description: The update's width.
hs_code:
type: string
title: hs_code
description: The update's hs code.
mid_code:
type: string
title: mid_code
description: The update's mid code.
origin_country:
type: string
title: origin_country
description: The update's origin country.
material:
type: string
title: material
description: The update's material.
metadata:
type: object
description: The update's metadata.
AdminUpdateProductOption:
type: object
description: SUMMARY
x-schemaName: AdminUpdateProductOption
properties:
title:
type: string
title: title
description: The product's title.
values:
type: array
description: The product's values.
items:
type: string
title: values
description: The value's values.
AdminUpdateProductVariant:
type: object
description: The update's details.
x-schemaName: AdminUpdateProductVariant
properties:
title:
type: string
title: title
description: The update's title.
sku:
type: string
title: sku
description: The update's sku.
ean:
type: string
title: ean
description: The update's ean.
upc:
type: string
title: upc
description: The update's upc.
barcode:
type: string
title: barcode
description: The update's barcode.
hs_code:
type: string
title: hs_code
description: The update's hs code.
mid_code:
type: string
title: mid_code
description: The update's mid code.
allow_backorder:
type: boolean
title: allow_backorder
description: The update's allow backorder.
manage_inventory:
type: boolean
title: manage_inventory
description: The update's manage inventory.
variant_rank:
type: number
title: variant_rank
description: The update's variant rank.
weight:
type: number
title: weight
description: The update's weight.
length:
type: number
title: length
description: The update's length.
height:
type: number
title: height
description: The update's height.
width:
type: number
title: width
description: The update's width.
origin_country:
type: string
title: origin_country
description: The update's origin country.
material:
type: string
title: material
description: The update's material.
metadata:
type: object
description: The update's metadata.
prices:
type: array
description: The update's prices.
items:
$ref: '#/components/schemas/AdminCreateProductVariantPrice'
options:
type: object
description: The update's options.
AdminUpdateSalesChannel:
type: object
description: SUMMARY
x-schemaName: AdminUpdateSalesChannel
required:
- description
- metadata
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: The sales channel's is disabled.
metadata:
type: object
description: The sales channel's metadata.
AdminUpdateStockLocation:
type: object
description: SUMMARY
x-schemaName: AdminUpdateStockLocation
required:
- address_id
- metadata
properties:
name:
type: string
title: name
description: The stock location's name.
address:
type: object
description: The stock location's address.
required:
- address_1
- address_2
- company
- city
- country_code
- phone
- postal_code
- province
properties:
address_1:
type: string
title: address_1
description: The address's address 1.
address_2:
type: string
title: address_2
description: The address's address 2.
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.
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 stock location's address id.
metadata:
type: object
description: The stock location's metadata.
AdminUpdateStore:
type: object
description: SUMMARY
x-schemaName: AdminUpdateStore
required:
- default_sales_channel_id
- default_region_id
- default_location_id
- metadata
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: The supported currency's supported currencies.
required:
- currency_code
properties:
currency_code:
type: string
title: currency_code
description: The supported currency's currency code.
is_default:
type: boolean
title: is_default
description: The supported currency's is default.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The supported currency's is tax inclusive.
default_sales_channel_id:
type: string
title: default_sales_channel_id
description: The store's default sales channel id.
default_region_id:
type: string
title: default_region_id
description: The store's default region id.
default_location_id:
type: string
title: default_location_id
description: The store's default location id.
metadata:
type: object
description: The store's metadata.
AdminUpdateTaxRate:
type: object
description: SUMMARY
x-schemaName: AdminUpdateTaxRate
required:
- code
- metadata
properties:
rate:
type: number
title: rate
description: The tax rate's rate.
code:
type: string
title: code
description: The tax rate's code.
rules:
type: array
description: The tax rate's rules.
items:
type: object
description: The rule's rules.
required:
- reference
- reference_id
properties:
reference:
type: string
title: reference
description: The rule's reference.
reference_id:
type: string
title: reference_id
description: The rule's reference id.
name:
type: string
title: name
description: The tax rate's name.
is_default:
type: boolean
title: is_default
description: The tax rate's is default.
is_combinable:
type: boolean
title: is_combinable
description: The tax rate's is combinable.
metadata:
type: object
description: The tax rate's metadata.
AdminUpdateUser:
type: object
description: SUMMARY
x-schemaName: AdminUpdateUser
required:
- first_name
- last_name
- avatar_url
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 user's avatar url.
AdminUpdateVariantInventoryItem:
type: object
description: SUMMARY
x-schemaName: AdminUpdateVariantInventoryItem
required:
- required_quantity
properties:
required_quantity:
type: number
title: required_quantity
description: The product's required quantity.
AdminUpsertStockLocationAddress:
type: object
description: The stock location's address.
x-schemaName: AdminUpsertStockLocationAddress
required:
- address_1
- country_code
properties:
address_1:
type: string
title: address_1
description: The address's address 1.
address_2:
type: string
title: address_2
description: The address's address 2.
company:
type: string
title: company
description: The address's company.
country_code:
type: string
title: country_code
description: The address's country code.
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 user's avatar url.
metadata:
type: object
description: The user's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The user's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The user's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The user's deleted at.
AdminUserDeleteResponse:
type: object
description: SUMMARY
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: SUMMARY
x-schemaName: AdminUserListResponse
required:
- limit
- offset
- count
- users
properties:
limit:
type: number
title: limit
description: The user's limit.
offset:
type: number
title: offset
description: The user's offset.
count:
type: number
title: count
description: The user's count.
users:
type: array
description: The user's users.
items:
$ref: '#/components/schemas/AdminUser'
AdminUserResponse:
type: object
description: SUMMARY
x-schemaName: AdminUserResponse
required:
- user
properties:
user:
$ref: '#/components/schemas/AdminUser'
AdminWorkflowExecution:
type: object
description: The workflows execution's workflow execution.
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 workflow execution's workflow id.
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 workflow execution's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The workflow execution's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The workflow execution's deleted at.
AdminWorkflowExecutionExecution:
type: object
description: The workflow execution's execution.
x-schemaName: AdminWorkflowExecutionExecution
required:
- steps
properties:
steps:
type: object
description: The execution's steps.
AdminWorkflowExecutionResponse:
type: object
description: SUMMARY
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 api key's redacted.
title:
type: string
title: title
description: The api key's title.
type:
type: string
enum:
- secret
- publishable
last_used_at:
type: string
title: last_used_at
description: The api key's last used at.
format: date-time
created_by:
type: string
title: created_by
description: The api key's created by.
created_at:
type: string
title: created_at
description: The api key's created at.
format: date-time
revoked_by:
type: string
title: revoked_by
description: The api key's revoked by.
revoked_at:
type: string
title: revoked_at
description: The api key's revoked at.
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'
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'
BaseApplicationMethod:
type: object
description: The promotion's application method.
x-schemaName: BaseApplicationMethod
required:
- id
properties:
id:
type: string
title: id
description: The application method's ID.
type:
type: string
description: The application method's type.
enum:
- fixed
- percentage
target_type:
type: string
description: The application method's target type.
enum:
- items
- shipping_methods
- order
allocation:
type: string
description: The application method's allocation.
enum:
- each
- across
value:
type: number
title: value
description: The application method's value.
currency_code:
type: string
title: currency_code
description: The application method's currency code.
max_quantity:
type: number
title: max_quantity
description: The application method's max quantity.
buy_rules_min_quantity:
type: number
title: buy_rules_min_quantity
description: The application method's buy rules min quantity.
apply_to_quantity:
type: number
title: apply_to_quantity
description: The application method's apply to quantity.
promotion:
$ref: '#/components/schemas/BasePromotion'
target_rules:
type: array
description: The application method's target rules.
items:
$ref: '#/components/schemas/BasePromotionRule'
buy_rules:
type: array
description: The application method's buy rules.
items:
$ref: '#/components/schemas/BasePromotionRule'
BaseCalculatedPriceSet:
type: object
description: The parent's calculated price.
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: The calculated price's is calculated price price list.
is_calculated_price_tax_inclusive:
type: boolean
title: is_calculated_price_tax_inclusive
description: The calculated price's is calculated price tax inclusive.
calculated_amount:
type: number
title: calculated_amount
description: The calculated price's calculated amount.
calculated_amount_with_tax:
type: number
title: calculated_amount_with_tax
description: The calculated price's calculated amount with tax.
calculated_amount_without_tax:
type: number
title: calculated_amount_without_tax
description: The calculated price's calculated amount without tax.
is_original_price_price_list:
type: boolean
title: is_original_price_price_list
description: The calculated price's is original price price list.
is_original_price_tax_inclusive:
type: boolean
title: is_original_price_tax_inclusive
description: The calculated price's is original price tax inclusive.
original_amount:
type: number
title: original_amount
description: The calculated price's original amount.
currency_code:
type: string
title: currency_code
description: The calculated price's currency code.
calculated_price:
type: object
description: The calculated price's details.
original_price:
type: object
description: The calculated price's original price.
BaseCapture:
type: object
description: The capture's captures.
x-schemaName: BaseCapture
BaseCart:
type: object
description: The item's cart.
x-schemaName: BaseCart
BaseCartAddress:
type: object
description: The parent's billing address.
x-schemaName: BaseCartAddress
required:
- id
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The billing address's ID.
customer_id:
type: string
title: customer_id
description: The billing address's customer id.
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The billing address's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The billing address's updated at.
BaseCartLineItem:
type: object
description: The item's items.
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:
oneOf:
- type: string
title: quantity
description: The item's quantity.
- type: number
title: quantity
description: The item's quantity.
- type: string
title: quantity
description: The item's quantity.
- $ref: '#/components/schemas/IBigNumber'
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:
oneOf:
- type: string
title: compare_at_unit_price
description: The item's compare at unit price.
- type: number
title: compare_at_unit_price
description: The item's compare at unit price.
- type: string
title: compare_at_unit_price
description: The item's compare at unit price.
- $ref: '#/components/schemas/IBigNumber'
unit_price:
oneOf:
- type: string
title: unit_price
description: The item's unit price.
- type: number
title: unit_price
description: The item's unit price.
- type: string
title: unit_price
description: The item's unit price.
- $ref: '#/components/schemas/IBigNumber'
tax_lines:
type: array
description: The item's tax lines.
items:
$ref: '#/components/schemas/BaseLineItemTaxLine'
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:
oneOf:
- type: string
title: original_total
description: The item's original total.
- type: number
title: original_total
description: The item's original total.
- type: string
title: original_total
description: The item's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The item's original subtotal.
- type: number
title: original_subtotal
description: The item's original subtotal.
- type: string
title: original_subtotal
description: The item's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The item's original tax total.
- type: number
title: original_tax_total
description: The item's original tax total.
- type: string
title: original_tax_total
description: The item's original tax total.
- $ref: '#/components/schemas/IBigNumber'
item_total:
oneOf:
- type: string
title: item_total
description: The item's item total.
- type: number
title: item_total
description: The item's item total.
- type: string
title: item_total
description: The item's item total.
- $ref: '#/components/schemas/IBigNumber'
item_subtotal:
oneOf:
- type: string
title: item_subtotal
description: The item's item subtotal.
- type: number
title: item_subtotal
description: The item's item subtotal.
- type: string
title: item_subtotal
description: The item's item subtotal.
- $ref: '#/components/schemas/IBigNumber'
item_tax_total:
oneOf:
- type: string
title: item_tax_total
description: The item's item tax total.
- type: number
title: item_tax_total
description: The item's item tax total.
- type: string
title: item_tax_total
description: The item's item tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The item's total.
- type: number
title: total
description: The item's total.
- type: string
title: total
description: The item's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The item's subtotal.
- type: number
title: subtotal
description: The item's subtotal.
- type: string
title: subtotal
description: The item's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The item's tax total.
- type: number
title: tax_total
description: The item's tax total.
- type: string
title: tax_total
description: The item's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The item's discount total.
- type: number
title: discount_total
description: The item's discount total.
- type: string
title: discount_total
description: The item's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The item's discount tax total.
- type: number
title: discount_tax_total
description: The item's discount tax total.
- type: string
title: discount_tax_total
description: The item's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
BaseCartShippingMethod:
type: object
description: The shipping method's shipping methods.
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 shipping method's cart id.
name:
type: string
title: name
description: The shipping method's name.
description:
type: string
title: description
description: The shipping method's description.
amount:
oneOf:
- type: string
title: amount
description: The shipping method's amount.
- type: number
title: amount
description: The shipping method's amount.
- type: string
title: amount
description: The shipping method's amount.
- $ref: '#/components/schemas/IBigNumber'
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The shipping method's is tax inclusive.
shipping_option_id:
type: string
title: shipping_option_id
description: The shipping method's shipping option id.
data:
type: object
description: The shipping method's data.
metadata:
type: object
description: The shipping method's metadata.
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.
items:
$ref: '#/components/schemas/BaseShippingMethodAdjustment'
created_at:
type: string
format: date-time
title: created_at
description: The shipping method's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The shipping method's updated at.
original_total:
oneOf:
- type: string
title: original_total
description: The shipping method's original total.
- type: number
title: original_total
description: The shipping method's original total.
- type: string
title: original_total
description: The shipping method's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The shipping method's original subtotal.
- type: number
title: original_subtotal
description: The shipping method's original subtotal.
- type: string
title: original_subtotal
description: The shipping method's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The shipping method's original tax total.
- type: number
title: original_tax_total
description: The shipping method's original tax total.
- type: string
title: original_tax_total
description: The shipping method's original tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The shipping method's total.
- type: number
title: total
description: The shipping method's total.
- type: string
title: total
description: The shipping method's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The shipping method's subtotal.
- type: number
title: subtotal
description: The shipping method's subtotal.
- type: string
title: subtotal
description: The shipping method's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The shipping method's tax total.
- type: number
title: tax_total
description: The shipping method's tax total.
- type: string
title: tax_total
description: The shipping method's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The shipping method's discount total.
- type: number
title: discount_total
description: The shipping method's discount total.
- type: string
title: discount_total
description: The shipping method's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The shipping method's discount tax total.
- type: number
title: discount_tax_total
description: The shipping method's discount tax total.
- type: string
title: discount_tax_total
description: The shipping method's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
BaseClaim:
type: object
description: The order change's claim.
x-schemaName: BaseClaim
BaseClaimItem:
type: object
description: The claim item's claim items.
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 claim item's claim id.
order_id:
type: string
title: order_id
description: The claim item's order id.
item_id:
type: string
title: item_id
description: The claim item's item id.
quantity:
type: number
title: quantity
description: The claim item's quantity.
reason:
type: string
description: The claim item's reason.
enum:
- missing_item
- wrong_item
- production_failure
- other
raw_quantity:
type: object
description: The claim item's raw quantity.
metadata:
type: object
description: The claim item's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The claim item's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The claim item's updated at.
BaseCollection:
type: object
description: The product's collection.
x-schemaName: BaseCollection
BaseCustomerAddress:
type: object
description: The address's addresses.
x-schemaName: BaseCustomerAddress
BaseExchangeItem:
type: object
description: The additional item's additional items.
x-schemaName: BaseExchangeItem
required:
- id
- exchange_id
- order_id
- item_id
- quantity
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The additional item's ID.
exchange_id:
type: string
title: exchange_id
description: The additional item's exchange id.
order_id:
type: string
title: order_id
description: The additional item's order id.
item_id:
type: string
title: item_id
description: The additional item's item id.
quantity:
type: number
title: quantity
description: The additional item's quantity.
metadata:
type: object
description: The additional item's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The additional item's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The additional item's updated at.
BaseFulfillmentProvider:
type: object
description: The shipping option's provider.
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: The provider's is enabled.
BaseLineItemAdjustment:
type: object
description: The adjustment's adjustments.
x-schemaName: BaseLineItemAdjustment
BaseLineItemTaxLine:
type: object
description: The tax line's tax lines.
x-schemaName: BaseLineItemTaxLine
BaseOrder:
type: object
description: The order change's order.
x-schemaName: BaseOrder
BaseOrderAddress:
type: object
description: The exchange's billing address.
x-schemaName: BaseOrderAddress
required:
- id
- metadata
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The billing address's ID.
customer_id:
type: string
title: customer_id
description: The billing address's customer id.
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The billing address's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The billing address's updated at.
BaseOrderChange:
type: object
description: The order preview's order change.
x-schemaName: BaseOrderChange
required:
- id
- order_id
- actions
- status
- requested_by
- requested_at
- confirmed_by
- confirmed_at
- declined_by
- declined_reason
- metadata
- declined_at
- canceled_by
- canceled_at
- created_at
- updated_at
- version
- return_id
- exchange_id
- claim_id
- order
- return_order
- exchange
- claim
properties:
id:
type: string
title: id
description: The order change's ID.
order_id:
type: string
title: order_id
description: The order change's order id.
actions:
type: array
description: The order change's actions.
items:
$ref: '#/components/schemas/BaseOrderChangeAction'
status:
type: string
title: status
description: The order change's status.
requested_by:
type: string
title: requested_by
description: The order change's requested by.
requested_at:
oneOf:
- type: string
title: requested_at
description: The order change's requested at.
- type: string
title: requested_at
description: The order change's requested at.
format: date-time
confirmed_by:
type: string
title: confirmed_by
description: The order change's confirmed by.
confirmed_at:
oneOf:
- type: string
title: confirmed_at
description: The order change's confirmed at.
- type: string
title: confirmed_at
description: The order change's confirmed at.
format: date-time
declined_by:
type: string
title: declined_by
description: The order change's declined by.
declined_reason:
type: string
title: declined_reason
description: The order change's declined reason.
metadata:
type: object
description: The order change's metadata.
declined_at:
oneOf:
- type: string
title: declined_at
description: The order change's declined at.
- type: string
title: declined_at
description: The order change's declined at.
format: date-time
canceled_by:
type: string
title: canceled_by
description: The order change's canceled by.
canceled_at:
oneOf:
- type: string
title: canceled_at
description: The order change's canceled at.
- type: string
title: canceled_at
description: The order change's canceled at.
format: date-time
created_at:
type: string
format: date-time
title: created_at
description: The order change's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The order change's updated at.
version:
type: number
title: version
description: The order change's version.
change_type:
type: string
description: The order change's change type.
enum:
- return
- exchange
- claim
- edit
- return_request
return_id:
type: string
title: return_id
description: The order change's return id.
exchange_id:
type: string
title: exchange_id
description: The order change's exchange id.
claim_id:
type: string
title: claim_id
description: The order change's claim id.
order:
$ref: '#/components/schemas/BaseOrder'
return_order: {}
exchange: {}
claim:
$ref: '#/components/schemas/BaseClaim'
BaseOrderChangeAction:
type: object
description: The action's actions.
x-schemaName: BaseOrderChangeAction
BaseOrderFulfillment:
type: object
description: The fulfillment's fulfillments.
x-schemaName: BaseOrderFulfillment
required:
- id
- location_id
- packed_at
- shipped_at
- delivered_at
- canceled_at
- 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 fulfillment's location id.
packed_at:
type: string
title: packed_at
description: The fulfillment's packed at.
format: date-time
shipped_at:
type: string
title: shipped_at
description: The fulfillment's shipped at.
format: date-time
delivered_at:
type: string
title: delivered_at
description: The fulfillment's delivered at.
format: date-time
canceled_at:
type: string
title: canceled_at
description: The fulfillment's canceled at.
format: date-time
data:
type: object
description: The fulfillment's data.
provider_id:
type: string
title: provider_id
description: The fulfillment's provider id.
shipping_option_id:
type: string
title: shipping_option_id
description: The fulfillment's shipping option id.
metadata:
type: object
description: The fulfillment's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The fulfillment's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The fulfillment's updated at.
BaseOrderItemDetail:
type: object
description: The item's detail.
x-schemaName: BaseOrderItemDetail
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
- 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 item's thumbnail.
variant:
$ref: '#/components/schemas/BaseProductVariant'
variant_id:
type: string
title: variant_id
description: The item's variant id.
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_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.
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 item's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The item's updated at.
metadata:
type: object
description: The item's metadata.
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.
refundable_total:
type: number
title: refundable_total
description: The item's refundable total.
refundable_total_per_unit:
type: number
title: refundable_total_per_unit
description: The item's refundable total per unit.
BaseOrderLineItemAdjustment:
type: object
description: The adjustment's adjustments.
x-schemaName: BaseOrderLineItemAdjustment
BaseOrderLineItemTaxLine:
type: object
description: The tax line's tax lines.
x-schemaName: BaseOrderLineItemTaxLine
BaseOrderShippingMethod:
type: object
description: The shipping method's shipping methods.
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 shipping method's order id.
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: The shipping method's is tax inclusive.
shipping_option_id:
type: string
title: shipping_option_id
description: The shipping method's shipping option id.
data:
type: object
description: The shipping method's data.
metadata:
type: object
description: The shipping method's metadata.
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 original total.
- type: number
title: original_total
description: The shipping method's original total.
- type: string
title: original_total
description: The shipping method's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The shipping method's original subtotal.
- type: number
title: original_subtotal
description: The shipping method's original subtotal.
- type: string
title: original_subtotal
description: The shipping method's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The shipping method's original tax total.
- type: number
title: original_tax_total
description: The shipping method's original tax total.
- type: string
title: original_tax_total
description: The shipping method's original tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The shipping method's total.
- type: number
title: total
description: The shipping method's total.
- type: string
title: total
description: The shipping method's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The shipping method's subtotal.
- type: number
title: subtotal
description: The shipping method's subtotal.
- type: string
title: subtotal
description: The shipping method's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The shipping method's tax total.
- type: number
title: tax_total
description: The shipping method's tax total.
- type: string
title: tax_total
description: The shipping method's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The shipping method's discount total.
- type: number
title: discount_total
description: The shipping method's discount total.
- type: string
title: discount_total
description: The shipping method's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The shipping method's discount tax total.
- type: number
title: discount_tax_total
description: The shipping method's discount tax total.
- type: string
title: discount_tax_total
description: The shipping method's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
created_at:
type: string
format: date-time
title: created_at
description: The shipping method's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The shipping method's updated at.
BaseOrderShippingMethodAdjustment:
type: object
description: The adjustment's adjustments.
x-schemaName: BaseOrderShippingMethodAdjustment
BaseOrderShippingMethodTaxLine:
type: object
description: The tax line's tax lines.
x-schemaName: BaseOrderShippingMethodTaxLine
BaseOrderSummary:
type: object
description: The order's summary.
x-schemaName: BaseOrderSummary
required:
- total
- subtotal
- total_tax
- ordered_total
- fulfilled_total
- returned_total
- return_request_total
- write_off_total
- projected_total
- net_total
- net_subtotal
- net_total_tax
- balance
- paid_total
- refunded_total
properties:
total:
type: number
title: total
description: The summary's total.
subtotal:
type: number
title: subtotal
description: The summary's subtotal.
total_tax:
type: number
title: total_tax
description: The summary's total tax.
ordered_total:
type: number
title: ordered_total
description: The summary's ordered total.
fulfilled_total:
type: number
title: fulfilled_total
description: The summary's fulfilled total.
returned_total:
type: number
title: returned_total
description: The summary's returned total.
return_request_total:
type: number
title: return_request_total
description: The summary's return request total.
write_off_total:
type: number
title: write_off_total
description: The summary's write off total.
projected_total:
type: number
title: projected_total
description: The summary's projected total.
net_total:
type: number
title: net_total
description: The summary's net total.
net_subtotal:
type: number
title: net_subtotal
description: The summary's net subtotal.
net_total_tax:
type: number
title: net_total_tax
description: The summary's net total tax.
balance:
type: number
title: balance
description: The summary's balance.
paid_total:
type: number
title: paid_total
description: The summary's paid total.
refunded_total:
type: number
title: refunded_total
description: The summary's refunded total.
BaseOrderTransaction:
type: object
description: The transaction's transactions.
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 transaction's order id.
amount:
type: number
title: amount
description: The transaction's amount.
currency_code:
type: string
title: currency_code
description: The transaction's currency code.
reference:
type: string
title: reference
description: The transaction's reference.
reference_id:
type: string
title: reference_id
description: The transaction's reference id.
metadata:
type: object
description: The transaction's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The transaction's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The transaction's updated at.
BasePayment:
type: object
description: The payment's payments.
x-schemaName: BasePayment
BasePaymentCollection:
type: object
description: The payment collection's payment collections.
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 payment collection's region id.
amount:
oneOf:
- type: string
title: amount
description: The payment collection's amount.
- type: number
title: amount
description: The payment collection's amount.
- type: string
title: amount
description: The payment collection's amount.
- $ref: '#/components/schemas/IBigNumber'
authorized_amount:
oneOf:
- type: string
title: authorized_amount
description: The payment collection's authorized amount.
- type: number
title: authorized_amount
description: The payment collection's authorized amount.
- type: string
title: authorized_amount
description: The payment collection's authorized amount.
- $ref: '#/components/schemas/IBigNumber'
captured_amount:
oneOf:
- type: string
title: captured_amount
description: The payment collection's captured amount.
- type: number
title: captured_amount
description: The payment collection's captured amount.
- type: string
title: captured_amount
description: The payment collection's captured amount.
- $ref: '#/components/schemas/IBigNumber'
refunded_amount:
oneOf:
- type: string
title: refunded_amount
description: The payment collection's refunded amount.
- type: number
title: refunded_amount
description: The payment collection's refunded amount.
- type: string
title: refunded_amount
description: The payment collection's refunded amount.
- $ref: '#/components/schemas/IBigNumber'
completed_at:
oneOf:
- type: string
title: completed_at
description: The payment collection's completed at.
- type: string
title: completed_at
description: The payment collection's completed at.
format: date-time
created_at:
type: string
format: date-time
title: created_at
description: The payment collection's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The payment collection's updated at.
metadata:
type: object
description: The payment collection's metadata.
status:
type: string
description: The payment collection's status.
enum:
- canceled
- not_paid
- awaiting
- authorized
- partially_authorized
payment_providers:
type: array
description: The payment collection's payment providers.
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 payment providers.
x-schemaName: BasePaymentProvider
BasePaymentSession:
type: object
description: The payment session's payment sessions.
x-schemaName: BasePaymentSession
BaseProduct:
type: object
description: The parent's product.
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:
id:
type: string
title: id
description: The product's ID.
title:
type: string
title: title
description: The product's title.
handle:
type: string
title: handle
description: The product's handle.
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: The product's is giftcard.
status:
type: string
description: The product's status.
enum:
- draft
- proposed
- published
- rejected
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.
length:
type: number
title: length
description: The product's length.
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:
$ref: '#/components/schemas/BaseCollection'
collection_id:
type: string
title: collection_id
description: The product's collection id.
categories:
type: array
description: The product's categories.
items:
$ref: '#/components/schemas/BaseProductCategory'
type:
type: object
type_id:
type: string
title: type_id
description: The product's type id.
tags:
type: array
description: The product's tags.
items:
$ref: '#/components/schemas/BaseProductTag'
variants:
type: array
description: The product's variants.
items:
$ref: '#/components/schemas/BaseProductVariant'
options:
type: array
description: The product's options.
items:
$ref: '#/components/schemas/BaseProductOption'
images:
type: array
description: The product's images.
items:
$ref: '#/components/schemas/BaseProductImage'
discountable:
type: boolean
title: discountable
description: The product's discountable.
external_id:
type: string
title: external_id
description: The product's external id.
created_at:
type: string
format: date-time
title: created_at
description: The product's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The product's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The product's deleted at.
metadata:
type: object
description: The product's metadata.
BaseProductCategory:
type: object
description: The category's categories.
x-schemaName: BaseProductCategory
BaseProductImage:
type: object
description: The image's images.
x-schemaName: BaseProductImage
BaseProductOption:
type: object
description: The option's options.
x-schemaName: BaseProductOption
BaseProductOptionValue:
type: object
description: The option's options.
x-schemaName: BaseProductOptionValue
required:
- id
- value
properties:
id:
type: string
title: id
description: The option's ID.
value:
type: string
title: value
description: The option's value.
option:
$ref: '#/components/schemas/BaseProductOption'
option_id:
type: string
title: option_id
description: The option's option id.
metadata:
type: object
description: The option's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The option's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The option's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The option's deleted at.
BaseProductTag:
type: object
description: The tag's tags.
x-schemaName: BaseProductTag
BaseProductVariant:
type: object
description: The variant's variants.
x-schemaName: BaseProductVariant
BasePromotion:
type: object
description: The application method's promotion.
x-schemaName: BasePromotion
BasePromotionRule:
type: object
description: The rule's rules.
x-schemaName: BasePromotionRule
required:
- id
- values
properties:
id:
type: string
title: id
description: The rule's ID.
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
operator:
type: string
description: The rule's operator.
enum:
- gt
- lt
- eq
- ne
- in
- lte
- gte
values:
type: array
description: The rule's values.
items:
$ref: '#/components/schemas/BasePromotionRuleValue'
BasePromotionRuleValue:
type: object
description: The value's values.
x-schemaName: BasePromotionRuleValue
required:
- id
properties:
id:
type: string
title: id
description: The value's ID.
value:
type: string
title: value
description: The value's details.
BaseRefund:
type: object
description: The refund's refunds.
x-schemaName: BaseRefund
BaseRegion:
type: object
description: The parent's region.
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 countries.
x-schemaName: BaseRegionCountry
BaseReturnItem:
type: object
description: The item's items.
x-schemaName: BaseReturnItem
BaseRuleOperatorOptions:
type: object
description: The operator's operators.
x-schemaName: BaseRuleOperatorOptions
required:
- id
- value
- label
properties:
id:
type: string
title: id
description: The operator's ID.
value:
type: string
title: value
description: The operator's value.
label:
type: string
title: label
description: The operator's label.
BaseShippingMethodAdjustment:
type: object
description: The adjustment's adjustments.
x-schemaName: BaseShippingMethodAdjustment
BaseShippingMethodTaxLine:
type: object
description: The tax line's tax lines.
x-schemaName: BaseShippingMethodTaxLine
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 cart's shipping address.
x-schemaName: CreateAddress
properties:
customer_id:
type: string
title: customer_id
description: The shipping address's customer id.
company:
type: string
title: company
description: The shipping address's company.
first_name:
type: string
title: first_name
description: The shipping address's first name.
last_name:
type: string
title: last_name
description: The shipping address's last name.
address_1:
type: string
title: address_1
description: The shipping address's address 1.
address_2:
type: string
title: address_2
description: The shipping address's address 2.
city:
type: string
title: city
description: The shipping address's city.
country_code:
type: string
title: country_code
description: The shipping address's country code.
province:
type: string
title: province
description: The shipping address's province.
postal_code:
type: string
title: postal_code
description: The shipping address's postal code.
phone:
type: string
title: phone
description: The shipping address's phone.
metadata:
type: object
description: The shipping address's metadata.
CreateCartAddress:
type: object
description: The cart's billing address.
x-schemaName: CreateCartAddress
properties:
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
CreateCartCreateLineItem:
type: object
description: The item's items.
x-schemaName: CreateCartCreateLineItem
required:
- quantity
- variant_id
properties:
quantity:
type: string
title: quantity
description: The item's quantity.
variant_id:
type: string
title: variant_id
description: The item's variant 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.
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_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.
is_giftcard:
type: boolean
title: is_giftcard
description: The item's is giftcard.
compare_at_unit_price:
type: string
title: compare_at_unit_price
description: The item's compare at unit price.
unit_price:
type: string
title: unit_price
description: The item's unit price.
metadata:
type: object
description: The item's metadata.
CreateCartWorkflowInput:
type: object
description: SUMMARY
x-schemaName: CreateCartWorkflowInput
properties:
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_id:
type: string
title: shipping_address_id
description: The cart's shipping address id.
billing_address_id:
type: string
title: billing_address_id
description: The cart's billing address id.
shipping_address:
oneOf:
- type: string
title: shipping_address
description: The cart's shipping address.
- $ref: '#/components/schemas/CreateCartAddress'
billing_address:
oneOf:
- type: string
title: billing_address
description: The cart's billing address.
- $ref: '#/components/schemas/CreateCartAddress'
metadata:
type: object
description: The cart's metadata.
items:
type: array
description: The cart's items.
items:
$ref: '#/components/schemas/CreateCartCreateLineItem'
promo_codes:
type: array
description: The cart's promo codes.
items:
type: string
title: promo_codes
description: The promo code's promo codes.
CreateOrderReturnReason:
type: object
description: SUMMARY
x-schemaName: CreateOrderReturnReason
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 return reason's parent return reason id.
metadata:
type: object
description: The return reason's metadata.
CustomerGroupInCustomerFilters:
type: object
description: The customer's groups.
x-schemaName: CustomerGroupInCustomerFilters
required:
- id
- name
- created_at
- updated_at
- deleted_at
properties:
id:
oneOf:
- type: string
title: id
description: The group's ID.
- type: array
description: The group's ID.
items:
type: string
title: id
description: The id's ID.
name:
oneOf:
- type: string
title: name
description: The group's name.
- type: array
description: The group's name.
items:
type: string
title: name
description: The name's details.
created_at:
type: object
description: The group's created at.
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`).
updated_at:
type: object
description: The group's updated at.
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: The group's deleted at.
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`).
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
File:
type: object
description: The product's file.
x-schemaName: File
required:
- lastModified
- name
- webkitRelativePath
- size
- type
- arrayBuffer
- stream
- text
properties:
lastModified:
type: number
title: lastModified
description: The file's lastmodified.
name:
type: string
title: name
description: The file's name.
webkitRelativePath:
type: string
title: webkitRelativePath
description: The file's webkitrelativepath.
size:
type: number
title: size
description: The file's size.
type:
type: string
title: type
description: The file's type.
arrayBuffer:
type: object
description: The file's arraybuffer.
slice:
type: object
description: The file's slice.
stream:
type: object
description: The file's stream.
text:
type: object
description: The file's text.
FileList:
type: object
description: SUMMARY
x-schemaName: FileList
required:
- length
- item
- __@iterator@258
properties:
length:
type: number
title: length
description: The upload's length.
item:
type: object
description: The upload's item.
__@iterator@258:
type: object
description: The upload's @iterator@258.
IBigNumber:
type: object
description: The shipping method's discount tax total.
x-schemaName: IBigNumber
InventoryLevel:
type: object
description: The inventory level's inventory levels.
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 inventory level's inventory item id.
location_id:
type: string
title: location_id
description: The inventory level's location id.
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:
type: number
title: available_quantity
description: The inventory level's available quantity.
incoming_quantity:
type: number
title: incoming_quantity
description: The inventory level's incoming quantity.
metadata:
type: object
description: The inventory level's metadata.
Order:
type: object
description: The transaction's order.
x-schemaName: Order
OrderAddress:
type: object
description: The order preview's billing address.
x-schemaName: OrderAddress
required:
- id
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The billing address's ID.
customer_id:
type: string
title: customer_id
description: The billing address's customer id.
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The billing address's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The billing address's updated at.
OrderChange:
type: object
description: The order preview's order change.
x-schemaName: OrderChange
required:
- id
- version
- order_id
- return_id
- exchange_id
- claim_id
- order
- return_order
- exchange
- claim
- actions
- status
- requested_by
- requested_at
- confirmed_by
- confirmed_at
- declined_by
- declined_reason
- metadata
- declined_at
- canceled_by
- canceled_at
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The order change's ID.
version:
type: number
title: version
description: The order change's version.
change_type:
type: string
description: The order change's change type.
enum:
- return
- exchange
- claim
- edit
order_id:
type: string
title: order_id
description: The order change's order id.
return_id:
type: string
title: return_id
description: The order change's return id.
exchange_id:
type: string
title: exchange_id
description: The order change's exchange id.
claim_id:
type: string
title: claim_id
description: The order change's claim id.
order:
type: object
return_order:
$ref: '#/components/schemas/Return'
exchange:
$ref: '#/components/schemas/OrderExchange'
claim:
$ref: '#/components/schemas/OrderClaim'
actions:
type: array
description: The order change's actions.
items:
$ref: '#/components/schemas/OrderChangeAction'
status:
type: string
title: status
description: The order change's status.
requested_by:
type: string
title: requested_by
description: The order change's requested by.
requested_at:
oneOf:
- type: string
title: requested_at
description: The order change's requested at.
- type: string
title: requested_at
description: The order change's requested at.
format: date-time
confirmed_by:
type: string
title: confirmed_by
description: The order change's confirmed by.
confirmed_at:
oneOf:
- type: string
title: confirmed_at
description: The order change's confirmed at.
- type: string
title: confirmed_at
description: The order change's confirmed at.
format: date-time
declined_by:
type: string
title: declined_by
description: The order change's declined by.
declined_reason:
type: string
title: declined_reason
description: The order change's declined reason.
metadata:
type: object
description: The order change's metadata.
declined_at:
oneOf:
- type: string
title: declined_at
description: The order change's declined at.
- type: string
title: declined_at
description: The order change's declined at.
format: date-time
canceled_by:
type: string
title: canceled_by
description: The order change's canceled by.
canceled_at:
oneOf:
- type: string
title: canceled_at
description: The order change's canceled at.
- type: string
title: canceled_at
description: The order change's canceled at.
format: date-time
created_at:
type: string
format: date-time
title: created_at
description: The order change's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The order change's updated at.
OrderChangeAction:
type: object
description: The action's actions.
x-schemaName: OrderChangeAction
OrderClaim:
type: object
description: The order change's claim.
x-schemaName: OrderClaim
OrderExchange:
type: object
description: The order change's exchange.
x-schemaName: OrderExchange
OrderItem:
type: object
description: The item's detail.
x-schemaName: OrderItem
OrderLineItemAdjustment:
type: object
description: The adjustment's adjustments.
x-schemaName: OrderLineItemAdjustment
OrderLineItemTaxLine:
type: object
description: The tax line's tax lines.
x-schemaName: OrderLineItemTaxLine
OrderPreview:
type: object
description: The order edit's order preview.
x-schemaName: OrderPreview
required:
- order_change
- status
- currency_code
- id
- version
- 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
- raw_original_item_total
- raw_original_item_subtotal
- raw_original_item_tax_total
- raw_item_total
- raw_item_subtotal
- raw_item_tax_total
- raw_original_total
- raw_original_subtotal
- raw_original_tax_total
- raw_total
- raw_subtotal
- raw_tax_total
- raw_discount_total
- raw_discount_tax_total
- raw_gift_card_total
- raw_gift_card_tax_total
- raw_shipping_total
- raw_shipping_subtotal
- raw_shipping_tax_total
- raw_original_shipping_total
- raw_original_shipping_subtotal
- raw_original_shipping_tax_total
properties:
order_change:
$ref: '#/components/schemas/OrderChange'
items:
type: array
description: The order preview's items.
items:
allOf:
- type: object
description: The item's items.
x-schemaName: OrderLineItem
required:
- id
- title
- requires_shipping
- is_discountable
- is_tax_inclusive
- unit_price
- raw_unit_price
- quantity
- raw_quantity
- detail
- created_at
- updated_at
- 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
- raw_original_total
- raw_original_subtotal
- raw_original_tax_total
- raw_item_total
- raw_item_subtotal
- raw_item_tax_total
- raw_total
- raw_subtotal
- raw_tax_total
- raw_discount_total
- raw_discount_tax_total
- raw_refundable_total
- raw_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 item's thumbnail.
variant_id:
type: string
title: variant_id
description: The item's variant id.
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_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.
raw_compare_at_unit_price:
type: object
description: The item's raw compare at unit price.
unit_price:
type: number
title: unit_price
description: The item's unit price.
raw_unit_price:
type: object
description: The item's raw unit price.
quantity:
type: number
title: quantity
description: The item's quantity.
raw_quantity:
type: object
description: The item's raw quantity.
tax_lines:
type: array
description: The item's tax lines.
items:
$ref: '#/components/schemas/OrderLineItemTaxLine'
adjustments:
type: array
description: The item's adjustments.
items:
$ref: '#/components/schemas/OrderLineItemAdjustment'
detail:
$ref: '#/components/schemas/OrderItem'
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.
metadata:
type: object
description: The item's metadata.
original_total:
oneOf:
- type: string
title: original_total
description: The item's original total.
- type: number
title: original_total
description: The item's original total.
- type: string
title: original_total
description: The item's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The item's original subtotal.
- type: number
title: original_subtotal
description: The item's original subtotal.
- type: string
title: original_subtotal
description: The item's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The item's original tax total.
- type: number
title: original_tax_total
description: The item's original tax total.
- type: string
title: original_tax_total
description: The item's original tax total.
- $ref: '#/components/schemas/IBigNumber'
item_total:
oneOf:
- type: string
title: item_total
description: The item's item total.
- type: number
title: item_total
description: The item's item total.
- type: string
title: item_total
description: The item's item total.
- $ref: '#/components/schemas/IBigNumber'
item_subtotal:
oneOf:
- type: string
title: item_subtotal
description: The item's item subtotal.
- type: number
title: item_subtotal
description: The item's item subtotal.
- type: string
title: item_subtotal
description: The item's item subtotal.
- $ref: '#/components/schemas/IBigNumber'
item_tax_total:
oneOf:
- type: string
title: item_tax_total
description: The item's item tax total.
- type: number
title: item_tax_total
description: The item's item tax total.
- type: string
title: item_tax_total
description: The item's item tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The item's total.
- type: number
title: total
description: The item's total.
- type: string
title: total
description: The item's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The item's subtotal.
- type: number
title: subtotal
description: The item's subtotal.
- type: string
title: subtotal
description: The item's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The item's tax total.
- type: number
title: tax_total
description: The item's tax total.
- type: string
title: tax_total
description: The item's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The item's discount total.
- type: number
title: discount_total
description: The item's discount total.
- type: string
title: discount_total
description: The item's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The item's discount tax total.
- type: number
title: discount_tax_total
description: The item's discount tax total.
- type: string
title: discount_tax_total
description: The item's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
refundable_total:
oneOf:
- type: string
title: refundable_total
description: The item's refundable total.
- type: number
title: refundable_total
description: The item's refundable total.
- type: string
title: refundable_total
description: The item's refundable total.
- $ref: '#/components/schemas/IBigNumber'
refundable_total_per_unit:
oneOf:
- type: string
title: refundable_total_per_unit
description: The item's refundable total per unit.
- type: number
title: refundable_total_per_unit
description: The item's refundable total per unit.
- type: string
title: refundable_total_per_unit
description: The item's refundable total per unit.
- $ref: '#/components/schemas/IBigNumber'
raw_original_total:
type: object
description: The item's raw original total.
raw_original_subtotal:
type: object
description: The item's raw original subtotal.
raw_original_tax_total:
type: object
description: The item's raw original tax total.
raw_item_total:
type: object
description: The item's raw item total.
raw_item_subtotal:
type: object
description: The item's raw item subtotal.
raw_item_tax_total:
type: object
description: The item's raw item tax total.
raw_total:
type: object
description: The item's raw total.
raw_subtotal:
type: object
description: The item's raw subtotal.
raw_tax_total:
type: object
description: The item's raw tax total.
raw_discount_total:
type: object
description: The item's raw discount total.
raw_discount_tax_total:
type: object
description: The item's raw discount tax total.
raw_refundable_total:
type: object
description: The item's raw refundable total.
raw_refundable_total_per_unit:
type: object
description: The item's raw refundable total per unit.
- type: object
description: The item's items.
properties:
actions:
type: array
description: The item's actions.
items:
type: object
description: The action's actions.
x-schemaName: OrderChangeAction
shipping_methods:
type: array
description: The order preview's shipping methods.
items:
allOf:
- type: object
description: The shipping method's shipping methods.
x-schemaName: OrderShippingMethod
required:
- id
- order_id
- name
- amount
- raw_amount
- is_tax_inclusive
- created_at
- updated_at
- original_total
- original_subtotal
- original_tax_total
- total
- subtotal
- tax_total
- discount_total
- discount_tax_total
- raw_original_total
- raw_original_subtotal
- raw_original_tax_total
- raw_total
- raw_subtotal
- raw_tax_total
- raw_discount_total
- raw_discount_tax_total
properties:
id:
type: string
title: id
description: The shipping method's ID.
order_id:
type: string
title: order_id
description: The shipping method's order id.
name:
type: string
title: name
description: The shipping method's name.
description:
type: string
title: description
description: The shipping method's description.
amount:
oneOf:
- type: string
title: amount
description: The shipping method's amount.
- type: number
title: amount
description: The shipping method's amount.
- type: string
title: amount
description: The shipping method's amount.
- $ref: '#/components/schemas/IBigNumber'
raw_amount:
type: object
description: The shipping method's raw amount.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The shipping method's is tax inclusive.
shipping_option_id:
type: string
title: shipping_option_id
description: The shipping method's shipping option id.
data:
type: object
description: The shipping method's data.
metadata:
type: object
description: The shipping method's metadata.
tax_lines:
type: array
description: The shipping method's tax lines.
items:
$ref: '#/components/schemas/OrderShippingMethodTaxLine'
adjustments:
type: array
description: The shipping method's adjustments.
items:
$ref: '#/components/schemas/OrderShippingMethodAdjustment'
created_at:
type: string
format: date-time
title: created_at
description: The shipping method's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The shipping method's updated at.
original_total:
oneOf:
- type: string
title: original_total
description: The shipping method's original total.
- type: number
title: original_total
description: The shipping method's original total.
- type: string
title: original_total
description: The shipping method's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The shipping method's original subtotal.
- type: number
title: original_subtotal
description: The shipping method's original subtotal.
- type: string
title: original_subtotal
description: The shipping method's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The shipping method's original tax total.
- type: number
title: original_tax_total
description: The shipping method's original tax total.
- type: string
title: original_tax_total
description: The shipping method's original tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The shipping method's total.
- type: number
title: total
description: The shipping method's total.
- type: string
title: total
description: The shipping method's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The shipping method's subtotal.
- type: number
title: subtotal
description: The shipping method's subtotal.
- type: string
title: subtotal
description: The shipping method's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The shipping method's tax total.
- type: number
title: tax_total
description: The shipping method's tax total.
- type: string
title: tax_total
description: The shipping method's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The shipping method's discount total.
- type: number
title: discount_total
description: The shipping method's discount total.
- type: string
title: discount_total
description: The shipping method's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The shipping method's discount tax total.
- type: number
title: discount_tax_total
description: The shipping method's discount tax total.
- type: string
title: discount_tax_total
description: The shipping method's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
raw_original_total:
type: object
description: The shipping method's raw original total.
raw_original_subtotal:
type: object
description: The shipping method's raw original subtotal.
raw_original_tax_total:
type: object
description: The shipping method's raw original tax total.
raw_total:
type: object
description: The shipping method's raw total.
raw_subtotal:
type: object
description: The shipping method's raw subtotal.
raw_tax_total:
type: object
description: The shipping method's raw tax total.
raw_discount_total:
type: object
description: The shipping method's raw discount total.
raw_discount_tax_total:
type: object
description: The shipping method's raw discount tax total.
- type: object
description: The shipping method's shipping methods.
properties:
actions:
type: array
description: The shipping method's actions.
items:
type: object
description: The action's actions.
x-schemaName: OrderChangeAction
status:
type: string
description: The order preview's status.
enum:
- canceled
- requires_action
- pending
- completed
- draft
- archived
currency_code:
type: string
title: currency_code
description: The order preview's currency code.
id:
type: string
title: id
description: The order preview's ID.
version:
type: number
title: version
description: The order preview's version.
region_id:
type: string
title: region_id
description: The order preview's region id.
customer_id:
type: string
title: customer_id
description: The order preview's customer id.
sales_channel_id:
type: string
title: sales_channel_id
description: The order preview's sales channel id.
email:
type: string
title: email
description: The order preview's email.
format: email
shipping_address:
$ref: '#/components/schemas/OrderAddress'
billing_address:
$ref: '#/components/schemas/OrderAddress'
transactions:
type: array
description: The order preview's transactions.
items:
$ref: '#/components/schemas/OrderTransaction'
summary:
type: object
description: The order preview's summary.
required:
- total
- subtotal
- total_tax
- ordered_total
- fulfilled_total
- returned_total
- return_request_total
- write_off_total
- projected_total
- net_total
- net_subtotal
- net_total_tax
- balance
- paid_total
- refunded_total
properties:
total:
oneOf:
- type: string
title: total
description: The summary's total.
- type: number
title: total
description: The summary's total.
- type: string
title: total
description: The summary's total.
- type: object
description: The summary's total.
x-schemaName: IBigNumber
subtotal:
oneOf:
- type: string
title: subtotal
description: The summary's subtotal.
- type: number
title: subtotal
description: The summary's subtotal.
- type: string
title: subtotal
description: The summary's subtotal.
- type: object
description: The summary's subtotal.
x-schemaName: IBigNumber
total_tax:
oneOf:
- type: string
title: total_tax
description: The summary's total tax.
- type: number
title: total_tax
description: The summary's total tax.
- type: string
title: total_tax
description: The summary's total tax.
- type: object
description: The summary's total tax.
x-schemaName: IBigNumber
ordered_total:
oneOf:
- type: string
title: ordered_total
description: The summary's ordered total.
- type: number
title: ordered_total
description: The summary's ordered total.
- type: string
title: ordered_total
description: The summary's ordered total.
- type: object
description: The summary's ordered total.
x-schemaName: IBigNumber
fulfilled_total:
oneOf:
- type: string
title: fulfilled_total
description: The summary's fulfilled total.
- type: number
title: fulfilled_total
description: The summary's fulfilled total.
- type: string
title: fulfilled_total
description: The summary's fulfilled total.
- type: object
description: The summary's fulfilled total.
x-schemaName: IBigNumber
returned_total:
oneOf:
- type: string
title: returned_total
description: The summary's returned total.
- type: number
title: returned_total
description: The summary's returned total.
- type: string
title: returned_total
description: The summary's returned total.
- type: object
description: The summary's returned total.
x-schemaName: IBigNumber
return_request_total:
oneOf:
- type: string
title: return_request_total
description: The summary's return request total.
- type: number
title: return_request_total
description: The summary's return request total.
- type: string
title: return_request_total
description: The summary's return request total.
- type: object
description: The summary's return request total.
x-schemaName: IBigNumber
write_off_total:
oneOf:
- type: string
title: write_off_total
description: The summary's write off total.
- type: number
title: write_off_total
description: The summary's write off total.
- type: string
title: write_off_total
description: The summary's write off total.
- type: object
description: The summary's write off total.
x-schemaName: IBigNumber
projected_total:
oneOf:
- type: string
title: projected_total
description: The summary's projected total.
- type: number
title: projected_total
description: The summary's projected total.
- type: string
title: projected_total
description: The summary's projected total.
- type: object
description: The summary's projected total.
x-schemaName: IBigNumber
net_total:
oneOf:
- type: string
title: net_total
description: The summary's net total.
- type: number
title: net_total
description: The summary's net total.
- type: string
title: net_total
description: The summary's net total.
- type: object
description: The summary's net total.
x-schemaName: IBigNumber
net_subtotal:
oneOf:
- type: string
title: net_subtotal
description: The summary's net subtotal.
- type: number
title: net_subtotal
description: The summary's net subtotal.
- type: string
title: net_subtotal
description: The summary's net subtotal.
- type: object
description: The summary's net subtotal.
x-schemaName: IBigNumber
net_total_tax:
oneOf:
- type: string
title: net_total_tax
description: The summary's net total tax.
- type: number
title: net_total_tax
description: The summary's net total tax.
- type: string
title: net_total_tax
description: The summary's net total tax.
- type: object
description: The summary's net total tax.
x-schemaName: IBigNumber
balance:
oneOf:
- type: string
title: balance
description: The summary's balance.
- type: number
title: balance
description: The summary's balance.
- type: string
title: balance
description: The summary's balance.
- type: object
description: The summary's balance.
x-schemaName: IBigNumber
paid_total:
oneOf:
- type: string
title: paid_total
description: The summary's paid total.
- type: number
title: paid_total
description: The summary's paid total.
- type: string
title: paid_total
description: The summary's paid total.
- type: object
description: The summary's paid total.
x-schemaName: IBigNumber
refunded_total:
oneOf:
- type: string
title: refunded_total
description: The summary's refunded total.
- type: number
title: refunded_total
description: The summary's refunded total.
- type: string
title: refunded_total
description: The summary's refunded total.
- type: object
description: The summary's refunded total.
x-schemaName: IBigNumber
metadata:
type: object
description: The order preview's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The order preview's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The order preview's updated at.
original_item_total:
oneOf:
- type: string
title: original_item_total
description: The order preview's original item total.
- type: number
title: original_item_total
description: The order preview's original item total.
- type: string
title: original_item_total
description: The order preview's original item total.
- $ref: '#/components/schemas/IBigNumber'
original_item_subtotal:
oneOf:
- type: string
title: original_item_subtotal
description: The order preview's original item subtotal.
- type: number
title: original_item_subtotal
description: The order preview's original item subtotal.
- type: string
title: original_item_subtotal
description: The order preview's original item subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_item_tax_total:
oneOf:
- type: string
title: original_item_tax_total
description: The order preview's original item tax total.
- type: number
title: original_item_tax_total
description: The order preview's original item tax total.
- type: string
title: original_item_tax_total
description: The order preview's original item tax total.
- $ref: '#/components/schemas/IBigNumber'
item_total:
oneOf:
- type: string
title: item_total
description: The order preview's item total.
- type: number
title: item_total
description: The order preview's item total.
- type: string
title: item_total
description: The order preview's item total.
- $ref: '#/components/schemas/IBigNumber'
item_subtotal:
oneOf:
- type: string
title: item_subtotal
description: The order preview's item subtotal.
- type: number
title: item_subtotal
description: The order preview's item subtotal.
- type: string
title: item_subtotal
description: The order preview's item subtotal.
- $ref: '#/components/schemas/IBigNumber'
item_tax_total:
oneOf:
- type: string
title: item_tax_total
description: The order preview's item tax total.
- type: number
title: item_tax_total
description: The order preview's item tax total.
- type: string
title: item_tax_total
description: The order preview's item tax total.
- $ref: '#/components/schemas/IBigNumber'
original_total:
oneOf:
- type: string
title: original_total
description: The order preview's original total.
- type: number
title: original_total
description: The order preview's original total.
- type: string
title: original_total
description: The order preview's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The order preview's original subtotal.
- type: number
title: original_subtotal
description: The order preview's original subtotal.
- type: string
title: original_subtotal
description: The order preview's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The order preview's original tax total.
- type: number
title: original_tax_total
description: The order preview's original tax total.
- type: string
title: original_tax_total
description: The order preview's original tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The order preview's total.
- type: number
title: total
description: The order preview's total.
- type: string
title: total
description: The order preview's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The order preview's subtotal.
- type: number
title: subtotal
description: The order preview's subtotal.
- type: string
title: subtotal
description: The order preview's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The order preview's tax total.
- type: number
title: tax_total
description: The order preview's tax total.
- type: string
title: tax_total
description: The order preview's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The order preview's discount total.
- type: number
title: discount_total
description: The order preview's discount total.
- type: string
title: discount_total
description: The order preview's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The order preview's discount tax total.
- type: number
title: discount_tax_total
description: The order preview's discount tax total.
- type: string
title: discount_tax_total
description: The order preview's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
gift_card_total:
oneOf:
- type: string
title: gift_card_total
description: The order preview's gift card total.
- type: number
title: gift_card_total
description: The order preview's gift card total.
- type: string
title: gift_card_total
description: The order preview's gift card total.
- $ref: '#/components/schemas/IBigNumber'
gift_card_tax_total:
oneOf:
- type: string
title: gift_card_tax_total
description: The order preview's gift card tax total.
- type: number
title: gift_card_tax_total
description: The order preview's gift card tax total.
- type: string
title: gift_card_tax_total
description: The order preview's gift card tax total.
- $ref: '#/components/schemas/IBigNumber'
shipping_total:
oneOf:
- type: string
title: shipping_total
description: The order preview's shipping total.
- type: number
title: shipping_total
description: The order preview's shipping total.
- type: string
title: shipping_total
description: The order preview's shipping total.
- $ref: '#/components/schemas/IBigNumber'
shipping_subtotal:
oneOf:
- type: string
title: shipping_subtotal
description: The order preview's shipping subtotal.
- type: number
title: shipping_subtotal
description: The order preview's shipping subtotal.
- type: string
title: shipping_subtotal
description: The order preview's shipping subtotal.
- $ref: '#/components/schemas/IBigNumber'
shipping_tax_total:
oneOf:
- type: string
title: shipping_tax_total
description: The order preview's shipping tax total.
- type: number
title: shipping_tax_total
description: The order preview's shipping tax total.
- type: string
title: shipping_tax_total
description: The order preview's shipping tax total.
- $ref: '#/components/schemas/IBigNumber'
original_shipping_total:
oneOf:
- type: string
title: original_shipping_total
description: The order preview's original shipping total.
- type: number
title: original_shipping_total
description: The order preview's original shipping total.
- type: string
title: original_shipping_total
description: The order preview's original shipping total.
- $ref: '#/components/schemas/IBigNumber'
original_shipping_subtotal:
oneOf:
- type: string
title: original_shipping_subtotal
description: The order preview's original shipping subtotal.
- type: number
title: original_shipping_subtotal
description: The order preview's original shipping subtotal.
- type: string
title: original_shipping_subtotal
description: The order preview's original shipping subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_shipping_tax_total:
oneOf:
- type: string
title: original_shipping_tax_total
description: The order preview's original shipping tax total.
- type: number
title: original_shipping_tax_total
description: The order preview's original shipping tax total.
- type: string
title: original_shipping_tax_total
description: The order preview's original shipping tax total.
- $ref: '#/components/schemas/IBigNumber'
canceled_at:
oneOf:
- type: string
title: canceled_at
description: The order preview's canceled at.
- type: string
title: canceled_at
description: The order preview's canceled at.
format: date-time
raw_original_item_total:
type: object
description: The order preview's raw original item total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original item total's value.
- type: number
title: value
description: The raw original item total's value.
raw_original_item_subtotal:
type: object
description: The order preview's raw original item subtotal.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original item subtotal's value.
- type: number
title: value
description: The raw original item subtotal's value.
raw_original_item_tax_total:
type: object
description: The order preview's raw original item tax total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original item tax total's value.
- type: number
title: value
description: The raw original item tax total's value.
raw_item_total:
type: object
description: The order preview's raw item total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw item total's value.
- type: number
title: value
description: The raw item total's value.
raw_item_subtotal:
type: object
description: The order preview's raw item subtotal.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw item subtotal's value.
- type: number
title: value
description: The raw item subtotal's value.
raw_item_tax_total:
type: object
description: The order preview's raw item tax total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw item tax total's value.
- type: number
title: value
description: The raw item tax total's value.
raw_original_total:
type: object
description: The order preview's raw original total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original total's value.
- type: number
title: value
description: The raw original total's value.
raw_original_subtotal:
type: object
description: The order preview's raw original subtotal.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original subtotal's value.
- type: number
title: value
description: The raw original subtotal's value.
raw_original_tax_total:
type: object
description: The order preview's raw original tax total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original tax total's value.
- type: number
title: value
description: The raw original tax total's value.
raw_total:
type: object
description: The order preview's raw total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw total's value.
- type: number
title: value
description: The raw total's value.
raw_subtotal:
type: object
description: The order preview's raw subtotal.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw subtotal's value.
- type: number
title: value
description: The raw subtotal's value.
raw_tax_total:
type: object
description: The order preview's raw tax total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw tax total's value.
- type: number
title: value
description: The raw tax total's value.
raw_discount_total:
type: object
description: The order preview's raw discount total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw discount total's value.
- type: number
title: value
description: The raw discount total's value.
raw_discount_tax_total:
type: object
description: The order preview's raw discount tax total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw discount tax total's value.
- type: number
title: value
description: The raw discount tax total's value.
raw_gift_card_total:
type: object
description: The order preview's raw gift card total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw gift card total's value.
- type: number
title: value
description: The raw gift card total's value.
raw_gift_card_tax_total:
type: object
description: The order preview's raw gift card tax total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw gift card tax total's value.
- type: number
title: value
description: The raw gift card tax total's value.
raw_shipping_total:
type: object
description: The order preview's raw shipping total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw shipping total's value.
- type: number
title: value
description: The raw shipping total's value.
raw_shipping_subtotal:
type: object
description: The order preview's raw shipping subtotal.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw shipping subtotal's value.
- type: number
title: value
description: The raw shipping subtotal's value.
raw_shipping_tax_total:
type: object
description: The order preview's raw shipping tax total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw shipping tax total's value.
- type: number
title: value
description: The raw shipping tax total's value.
raw_original_shipping_total:
type: object
description: The order preview's raw original shipping total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original shipping total's value.
- type: number
title: value
description: The raw original shipping total's value.
raw_original_shipping_subtotal:
type: object
description: The order preview's raw original shipping subtotal.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original shipping subtotal's value.
- type: number
title: value
description: The raw original shipping subtotal's value.
raw_original_shipping_tax_total:
type: object
description: The order preview's raw original shipping tax total.
required:
- value
properties:
value:
oneOf:
- type: string
title: value
description: The raw original shipping tax total's value.
- type: number
title: value
description: The raw original shipping tax total's value.
OrderShippingMethodAdjustment:
type: object
description: The adjustment's adjustments.
x-schemaName: OrderShippingMethodAdjustment
OrderShippingMethodTaxLine:
type: object
description: The tax line's tax lines.
x-schemaName: OrderShippingMethodTaxLine
OrderTransaction:
type: object
description: The transaction's transactions.
x-schemaName: OrderTransaction
required:
- id
- order_id
- order
- amount
- raw_amount
- currency_code
- reference
- reference_id
- created_at
- updated_at
- metadata
properties:
id:
type: string
title: id
description: The transaction's ID.
order_id:
type: string
title: order_id
description: The transaction's order id.
order:
type: object
amount:
oneOf:
- type: string
title: amount
description: The transaction's amount.
- type: number
title: amount
description: The transaction's amount.
- type: string
title: amount
description: The transaction's amount.
- $ref: '#/components/schemas/IBigNumber'
raw_amount:
type: object
description: The transaction's raw amount.
currency_code:
type: string
title: currency_code
description: The transaction's currency code.
reference:
type: string
title: reference
description: The transaction's reference.
reference_id:
type: string
title: reference_id
description: The transaction's reference id.
created_at:
type: string
format: date-time
title: created_at
description: The transaction's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The transaction's updated at.
metadata:
type: object
description: The transaction's metadata.
RefundReasonResponse:
type: object
description: SUMMARY
x-schemaName: RefundReasonResponse
required:
- refund_reason
properties:
refund_reason:
$ref: '#/components/schemas/AdminRefundReason'
ReservationResponse:
type: object
description: The reservation's details.
x-schemaName: ReservationResponse
required:
- id
- line_item_id
- location_id
- quantity
- external_id
- description
- inventory_item_id
- inventory_item
properties:
id:
type: string
title: id
description: The reservation's ID.
line_item_id:
type: string
title: line_item_id
description: The reservation's line item id.
location_id:
type: string
title: location_id
description: The reservation's location id.
quantity:
type: string
title: quantity
description: The reservation's quantity.
external_id:
type: string
title: external_id
description: The reservation's external id.
description:
type: string
title: description
description: The reservation's description.
inventory_item_id:
type: string
title: inventory_item_id
description: The reservation's inventory item id.
inventory_item:
type: object
description: The reservation's inventory item.
metadata:
type: object
description: The reservation's metadata.
created_by:
type: string
title: created_by
description: The reservation's created by.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The reservation's deleted at.
created_at:
type: string
format: date-time
title: created_at
description: The reservation's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The reservation's updated at.
Return:
type: object
description: The order change's return order.
x-schemaName: Return
StoreAddCartLineItem:
type: object
description: SUMMARY
x-schemaName: StoreAddCartLineItem
required:
- variant_id
- quantity
- metadata
properties:
variant_id:
type: string
title: variant_id
description: The cart's variant id.
quantity:
type: number
title: quantity
description: The cart's quantity.
metadata:
type: object
description: The cart's metadata.
StoreCalculateCartTaxes:
type: object
description: SUMMARY
x-schemaName: StoreCalculateCartTaxes
properties:
fields:
type: string
title: fields
description: The cart's fields.
StoreCart:
type: object
description: The cart's parent.
x-schemaName: StoreCart
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 parent's ID.
region:
$ref: '#/components/schemas/BaseRegion'
region_id:
type: string
title: region_id
description: The parent's region id.
customer_id:
type: string
title: customer_id
description: The parent's customer id.
sales_channel_id:
type: string
title: sales_channel_id
description: The parent's sales channel id.
email:
type: string
title: email
description: The parent's email.
format: email
currency_code:
type: string
title: currency_code
description: The parent's currency code.
shipping_address:
$ref: '#/components/schemas/BaseCartAddress'
billing_address:
$ref: '#/components/schemas/BaseCartAddress'
items:
type: array
description: The parent's items.
items:
$ref: '#/components/schemas/BaseCartLineItem'
shipping_methods:
type: array
description: The parent's shipping methods.
items:
$ref: '#/components/schemas/BaseCartShippingMethod'
payment_collection:
$ref: '#/components/schemas/BasePaymentCollection'
metadata:
type: object
description: The parent's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The parent's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The parent's updated at.
original_item_total:
oneOf:
- type: string
title: original_item_total
description: The parent's original item total.
- type: number
title: original_item_total
description: The parent's original item total.
- type: string
title: original_item_total
description: The parent's original item total.
- $ref: '#/components/schemas/IBigNumber'
original_item_subtotal:
oneOf:
- type: string
title: original_item_subtotal
description: The parent's original item subtotal.
- type: number
title: original_item_subtotal
description: The parent's original item subtotal.
- type: string
title: original_item_subtotal
description: The parent's original item subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_item_tax_total:
oneOf:
- type: string
title: original_item_tax_total
description: The parent's original item tax total.
- type: number
title: original_item_tax_total
description: The parent's original item tax total.
- type: string
title: original_item_tax_total
description: The parent's original item tax total.
- $ref: '#/components/schemas/IBigNumber'
item_total:
oneOf:
- type: string
title: item_total
description: The parent's item total.
- type: number
title: item_total
description: The parent's item total.
- type: string
title: item_total
description: The parent's item total.
- $ref: '#/components/schemas/IBigNumber'
item_subtotal:
oneOf:
- type: string
title: item_subtotal
description: The parent's item subtotal.
- type: number
title: item_subtotal
description: The parent's item subtotal.
- type: string
title: item_subtotal
description: The parent's item subtotal.
- $ref: '#/components/schemas/IBigNumber'
item_tax_total:
oneOf:
- type: string
title: item_tax_total
description: The parent's item tax total.
- type: number
title: item_tax_total
description: The parent's item tax total.
- type: string
title: item_tax_total
description: The parent's item tax total.
- $ref: '#/components/schemas/IBigNumber'
original_total:
oneOf:
- type: string
title: original_total
description: The parent's original total.
- type: number
title: original_total
description: The parent's original total.
- type: string
title: original_total
description: The parent's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The parent's original subtotal.
- type: number
title: original_subtotal
description: The parent's original subtotal.
- type: string
title: original_subtotal
description: The parent's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The parent's original tax total.
- type: number
title: original_tax_total
description: The parent's original tax total.
- type: string
title: original_tax_total
description: The parent's original tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The parent's total.
- type: number
title: total
description: The parent's total.
- type: string
title: total
description: The parent's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The parent's subtotal.
- type: number
title: subtotal
description: The parent's subtotal.
- type: string
title: subtotal
description: The parent's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The parent's tax total.
- type: number
title: tax_total
description: The parent's tax total.
- type: string
title: tax_total
description: The parent's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The parent's discount total.
- type: number
title: discount_total
description: The parent's discount total.
- type: string
title: discount_total
description: The parent's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The parent's discount tax total.
- type: number
title: discount_tax_total
description: The parent's discount tax total.
- type: string
title: discount_tax_total
description: The parent's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
gift_card_total:
oneOf:
- type: string
title: gift_card_total
description: The parent's gift card total.
- type: number
title: gift_card_total
description: The parent's gift card total.
- type: string
title: gift_card_total
description: The parent's gift card total.
- $ref: '#/components/schemas/IBigNumber'
gift_card_tax_total:
oneOf:
- type: string
title: gift_card_tax_total
description: The parent's gift card tax total.
- type: number
title: gift_card_tax_total
description: The parent's gift card tax total.
- type: string
title: gift_card_tax_total
description: The parent's gift card tax total.
- $ref: '#/components/schemas/IBigNumber'
shipping_total:
oneOf:
- type: string
title: shipping_total
description: The parent's shipping total.
- type: number
title: shipping_total
description: The parent's shipping total.
- type: string
title: shipping_total
description: The parent's shipping total.
- $ref: '#/components/schemas/IBigNumber'
shipping_subtotal:
oneOf:
- type: string
title: shipping_subtotal
description: The parent's shipping subtotal.
- type: number
title: shipping_subtotal
description: The parent's shipping subtotal.
- type: string
title: shipping_subtotal
description: The parent's shipping subtotal.
- $ref: '#/components/schemas/IBigNumber'
shipping_tax_total:
oneOf:
- type: string
title: shipping_tax_total
description: The parent's shipping tax total.
- type: number
title: shipping_tax_total
description: The parent's shipping tax total.
- type: string
title: shipping_tax_total
description: The parent's shipping tax total.
- $ref: '#/components/schemas/IBigNumber'
original_shipping_total:
oneOf:
- type: string
title: original_shipping_total
description: The parent's original shipping total.
- type: number
title: original_shipping_total
description: The parent's original shipping total.
- type: string
title: original_shipping_total
description: The parent's original shipping total.
- $ref: '#/components/schemas/IBigNumber'
original_shipping_subtotal:
oneOf:
- type: string
title: original_shipping_subtotal
description: The parent's original shipping subtotal.
- type: number
title: original_shipping_subtotal
description: The parent's original shipping subtotal.
- type: string
title: original_shipping_subtotal
description: The parent's original shipping subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_shipping_tax_total:
oneOf:
- type: string
title: original_shipping_tax_total
description: The parent's original shipping tax total.
- type: number
title: original_shipping_tax_total
description: The parent's original shipping tax total.
- type: string
title: original_shipping_tax_total
description: The parent's original shipping tax total.
- $ref: '#/components/schemas/IBigNumber'
StoreCartAddress:
type: object
description: The cart's billing address.
x-schemaName: StoreCartAddress
required:
- id
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The billing address's ID.
customer_id:
type: string
title: customer_id
description: The billing address's customer id.
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
created_at:
oneOf:
- type: string
title: created_at
description: The billing address's created at.
- type: string
title: created_at
description: The billing address's created at.
format: date-time
updated_at:
oneOf:
- type: string
title: updated_at
description: The billing address's updated at.
- type: string
title: updated_at
description: The billing address's updated at.
format: date-time
StoreCartLineItem:
type: object
description: The item's items.
x-schemaName: StoreCartLineItem
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:
oneOf:
- type: string
title: quantity
description: The item's quantity.
- type: number
title: quantity
description: The item's quantity.
- type: string
title: quantity
description: The item's quantity.
- $ref: '#/components/schemas/IBigNumber'
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:
oneOf:
- type: string
title: compare_at_unit_price
description: The item's compare at unit price.
- type: number
title: compare_at_unit_price
description: The item's compare at unit price.
- type: string
title: compare_at_unit_price
description: The item's compare at unit price.
- $ref: '#/components/schemas/IBigNumber'
unit_price:
oneOf:
- type: string
title: unit_price
description: The item's unit price.
- type: number
title: unit_price
description: The item's unit price.
- type: string
title: unit_price
description: The item's unit price.
- $ref: '#/components/schemas/IBigNumber'
tax_lines:
type: array
description: The item's tax lines.
items:
$ref: '#/components/schemas/BaseLineItemTaxLine'
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
title: created_at
description: The item's created at.
format: date-time
updated_at:
type: string
title: updated_at
description: The item's updated at.
format: date-time
deleted_at:
type: string
title: deleted_at
description: The item's deleted at.
format: date-time
original_total:
oneOf:
- type: string
title: original_total
description: The item's original total.
- type: number
title: original_total
description: The item's original total.
- type: string
title: original_total
description: The item's original total.
- $ref: '#/components/schemas/IBigNumber'
original_subtotal:
oneOf:
- type: string
title: original_subtotal
description: The item's original subtotal.
- type: number
title: original_subtotal
description: The item's original subtotal.
- type: string
title: original_subtotal
description: The item's original subtotal.
- $ref: '#/components/schemas/IBigNumber'
original_tax_total:
oneOf:
- type: string
title: original_tax_total
description: The item's original tax total.
- type: number
title: original_tax_total
description: The item's original tax total.
- type: string
title: original_tax_total
description: The item's original tax total.
- $ref: '#/components/schemas/IBigNumber'
item_total:
oneOf:
- type: string
title: item_total
description: The item's item total.
- type: number
title: item_total
description: The item's item total.
- type: string
title: item_total
description: The item's item total.
- $ref: '#/components/schemas/IBigNumber'
item_subtotal:
oneOf:
- type: string
title: item_subtotal
description: The item's item subtotal.
- type: number
title: item_subtotal
description: The item's item subtotal.
- type: string
title: item_subtotal
description: The item's item subtotal.
- $ref: '#/components/schemas/IBigNumber'
item_tax_total:
oneOf:
- type: string
title: item_tax_total
description: The item's item tax total.
- type: number
title: item_tax_total
description: The item's item tax total.
- type: string
title: item_tax_total
description: The item's item tax total.
- $ref: '#/components/schemas/IBigNumber'
total:
oneOf:
- type: string
title: total
description: The item's total.
- type: number
title: total
description: The item's total.
- type: string
title: total
description: The item's total.
- $ref: '#/components/schemas/IBigNumber'
subtotal:
oneOf:
- type: string
title: subtotal
description: The item's subtotal.
- type: number
title: subtotal
description: The item's subtotal.
- type: string
title: subtotal
description: The item's subtotal.
- $ref: '#/components/schemas/IBigNumber'
tax_total:
oneOf:
- type: string
title: tax_total
description: The item's tax total.
- type: number
title: tax_total
description: The item's tax total.
- type: string
title: tax_total
description: The item's tax total.
- $ref: '#/components/schemas/IBigNumber'
discount_total:
oneOf:
- type: string
title: discount_total
description: The item's discount total.
- type: number
title: discount_total
description: The item's discount total.
- type: string
title: discount_total
description: The item's discount total.
- $ref: '#/components/schemas/IBigNumber'
discount_tax_total:
oneOf:
- type: string
title: discount_tax_total
description: The item's discount tax total.
- type: number
title: discount_tax_total
description: The item's discount tax total.
- type: string
title: discount_tax_total
description: The item's discount tax total.
- $ref: '#/components/schemas/IBigNumber'
StoreCartResponse:
type: object
description: SUMMARY
x-schemaName: StoreCartResponse
required:
- cart
properties:
cart:
$ref: '#/components/schemas/StoreCart'
StoreCollection:
type: object
description: The collection's details.
x-schemaName: StoreCollection
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 created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The collection's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The collection's deleted at.
products:
type: array
description: The collection's products.
items:
$ref: '#/components/schemas/AdminProduct'
metadata:
type: object
description: The collection's metadata.
StoreCollectionResponse:
type: object
description: SUMMARY
x-schemaName: StoreCollectionResponse
required:
- collection
properties:
collection:
$ref: '#/components/schemas/StoreCollection'
StoreCreateCustomer:
type: object
description: SUMMARY
x-schemaName: StoreCreateCustomer
required:
- email
properties:
email:
type: string
title: email
description: The customer's email.
format: email
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.
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
StoreCreatePaymentCollection:
type: object
description: SUMMARY
x-schemaName: StoreCreatePaymentCollection
required:
- cart_id
properties:
cart_id:
type: string
title: cart_id
description: The payment collection's cart id.
StoreCreateReturn:
type: object
description: SUMMARY
x-schemaName: StoreCreateReturn
required:
- order_id
- items
- return_shipping
properties:
order_id:
type: string
title: order_id
description: The return's order id.
items:
type: array
description: The return's items.
items:
$ref: '#/components/schemas/StoreCreateReturnItem'
return_shipping:
$ref: '#/components/schemas/StoreCreateReturnShipping'
note:
type: string
title: note
description: The return's note.
receive_now:
type: boolean
title: receive_now
description: The return's receive now.
location_id:
type: string
title: location_id
description: The return's location id.
StoreCreateReturnItem:
type: object
description: The item's items.
x-schemaName: StoreCreateReturnItem
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
reason_id:
type: string
title: reason_id
description: The item's reason id.
note:
type: string
title: note
description: The item's note.
StoreCreateReturnShipping:
type: object
description: The return's return shipping.
x-schemaName: StoreCreateReturnShipping
required:
- option_id
properties:
option_id:
type: string
title: option_id
description: The return shipping's option id.
price:
type: number
title: price
description: The return shipping's price.
StoreCurrency:
type: object
description: The currency's details.
x-schemaName: StoreCurrency
required:
- code
- symbol
- symbol_native
- name
- decimal_digits
- rounding
- raw_rounding
- created_at
- updated_at
- deleted_at
properties:
code:
type: string
title: code
description: The currency's code.
symbol:
type: string
title: symbol
description: The currency's symbol.
symbol_native:
type: string
title: symbol_native
description: The currency's symbol native.
name:
type: string
title: name
description: The currency's name.
decimal_digits:
type: number
title: decimal_digits
description: The currency's decimal digits.
rounding:
type: number
title: rounding
description: The currency's rounding.
raw_rounding:
type: object
description: The currency's raw rounding.
required:
- value
- precision
properties:
value:
type: string
title: value
description: The raw rounding's value.
precision:
type: number
title: precision
description: The raw rounding's precision.
created_at:
type: string
format: date-time
title: created_at
description: The currency's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The currency's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The currency's deleted at.
StoreCurrencyListResponse:
type: object
description: SUMMARY
x-schemaName: StoreCurrencyListResponse
required:
- limit
- offset
- count
- currencies
properties:
limit:
type: number
title: limit
description: The currency's limit.
offset:
type: number
title: offset
description: The currency's offset.
count:
type: number
title: count
description: The currency's count.
currencies:
type: array
description: The currency's currencies.
items:
$ref: '#/components/schemas/StoreCurrency'
StoreCurrencyResponse:
type: object
description: SUMMARY
x-schemaName: StoreCurrencyResponse
required:
- currency
properties:
currency:
$ref: '#/components/schemas/StoreCurrency'
StoreCustomer:
type: object
description: The customer's parent.
x-schemaName: StoreCustomer
required:
- id
- email
- default_billing_address_id
- default_shipping_address_id
- company_name
- first_name
- last_name
- addresses
properties:
id:
type: string
title: id
description: The parent's ID.
email:
type: string
title: email
description: The parent's email.
format: email
default_billing_address_id:
type: string
title: default_billing_address_id
description: The parent's default billing address id.
default_shipping_address_id:
type: string
title: default_shipping_address_id
description: The parent's default shipping address id.
company_name:
type: string
title: company_name
description: The parent's company name.
first_name:
type: string
title: first_name
description: The parent's first name.
last_name:
type: string
title: last_name
description: The parent's last name.
addresses:
type: array
description: The parent's addresses.
items:
$ref: '#/components/schemas/BaseCustomerAddress'
phone:
type: string
title: phone
description: The parent's phone.
metadata:
type: object
description: The parent's metadata.
created_by:
type: string
title: created_by
description: The parent's created by.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The parent's deleted at.
created_at:
type: string
format: date-time
title: created_at
description: The parent's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The parent's updated at.
StoreCustomerAddress:
type: object
description: The customer's address.
x-schemaName: StoreCustomerAddress
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 address name.
is_default_shipping:
type: boolean
title: is_default_shipping
description: The address's is default shipping.
is_default_billing:
type: boolean
title: is_default_billing
description: The address's is default billing.
customer_id:
type: string
title: customer_id
description: The address's customer id.
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 address 1.
address_2:
type: string
title: address_2
description: The address's address 2.
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.
created_at:
type: string
format: date-time
title: created_at
description: The address's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The address's updated at.
StoreCustomerAddressListResponse:
type: object
description: SUMMARY
x-schemaName: StoreCustomerAddressListResponse
required:
- limit
- offset
- count
- addresses
properties:
limit:
type: number
title: limit
description: The customer's limit.
offset:
type: number
title: offset
description: The customer's offset.
count:
type: number
title: count
description: The customer's count.
addresses:
type: array
description: The customer's addresses.
items:
$ref: '#/components/schemas/StoreCustomerAddress'
StoreCustomerAddressResponse:
type: object
description: SUMMARY
x-schemaName: StoreCustomerAddressResponse
required:
- address
properties:
address:
$ref: '#/components/schemas/StoreCustomerAddress'
StoreCustomerResponse:
type: object
description: SUMMARY
x-schemaName: StoreCustomerResponse
required:
- customer
properties:
customer:
$ref: '#/components/schemas/StoreCustomer'
StoreOrder:
type: object
description: The cart's order.
x-schemaName: StoreOrder
required:
- id
- version
- region_id
- customer_id
- sales_channel_id
- email
- currency_code
- items
- shipping_methods
- payment_status
- fulfillment_status
- summary
- metadata
- 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:
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 order's region id.
customer_id:
type: string
title: customer_id
description: The order's customer id.
sales_channel_id:
type: string
title: sales_channel_id
description: The order's sales channel id.
email:
type: string
title: email
description: The order's email.
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.
shipping_address:
$ref: '#/components/schemas/BaseOrderAddress'
billing_address:
$ref: '#/components/schemas/BaseOrderAddress'
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_collections:
type: array
description: The order's payment collections.
items:
$ref: '#/components/schemas/BasePaymentCollection'
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/BaseOrderFulfillment'
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.
created_at:
type: string
format: date-time
title: created_at
description: The order's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The order's updated at.
original_item_total:
type: number
title: original_item_total
description: The order's original item total.
original_item_subtotal:
type: number
title: original_item_subtotal
description: The order's original item subtotal.
original_item_tax_total:
type: number
title: original_item_tax_total
description: The order's original item tax total.
item_total:
type: number
title: item_total
description: The order's item total.
item_subtotal:
type: number
title: item_subtotal
description: The order's item subtotal.
item_tax_total:
type: number
title: item_tax_total
description: The order's item tax total.
original_total:
type: number
title: original_total
description: The order's original total.
original_subtotal:
type: number
title: original_subtotal
description: The order's original subtotal.
original_tax_total:
type: number
title: original_tax_total
description: The order's original tax total.
total:
type: number
title: total
description: The order's total.
subtotal:
type: number
title: subtotal
description: The order's subtotal.
tax_total:
type: number
title: tax_total
description: The order's tax total.
discount_total:
type: number
title: discount_total
description: The order's discount total.
discount_tax_total:
type: number
title: discount_tax_total
description: The order's discount tax total.
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 order's gift card tax total.
shipping_total:
type: number
title: shipping_total
description: The order's shipping total.
shipping_subtotal:
type: number
title: shipping_subtotal
description: The order's shipping subtotal.
shipping_tax_total:
type: number
title: shipping_tax_total
description: The order's shipping tax total.
original_shipping_total:
type: number
title: original_shipping_total
description: The order's original shipping total.
original_shipping_subtotal:
type: number
title: original_shipping_subtotal
description: The order's original shipping subtotal.
original_shipping_tax_total:
type: number
title: original_shipping_tax_total
description: The order's original shipping tax total.
StoreOrderResponse:
type: object
description: SUMMARY
x-schemaName: StoreOrderResponse
required:
- order
properties:
order:
$ref: '#/components/schemas/StoreOrder'
StorePaymentCollection:
type: object
description: The payment collection's details.
x-schemaName: StorePaymentCollection
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 payment collection's region id.
amount:
oneOf:
- type: string
title: amount
description: The payment collection's amount.
- type: number
title: amount
description: The payment collection's amount.
- type: string
title: amount
description: The payment collection's amount.
- $ref: '#/components/schemas/IBigNumber'
authorized_amount:
oneOf:
- type: string
title: authorized_amount
description: The payment collection's authorized amount.
- type: number
title: authorized_amount
description: The payment collection's authorized amount.
- type: string
title: authorized_amount
description: The payment collection's authorized amount.
- $ref: '#/components/schemas/IBigNumber'
captured_amount:
oneOf:
- type: string
title: captured_amount
description: The payment collection's captured amount.
- type: number
title: captured_amount
description: The payment collection's captured amount.
- type: string
title: captured_amount
description: The payment collection's captured amount.
- $ref: '#/components/schemas/IBigNumber'
refunded_amount:
oneOf:
- type: string
title: refunded_amount
description: The payment collection's refunded amount.
- type: number
title: refunded_amount
description: The payment collection's refunded amount.
- type: string
title: refunded_amount
description: The payment collection's refunded amount.
- $ref: '#/components/schemas/IBigNumber'
completed_at:
oneOf:
- type: string
title: completed_at
description: The payment collection's completed at.
- type: string
title: completed_at
description: The payment collection's completed at.
format: date-time
created_at:
type: string
format: date-time
title: created_at
description: The payment collection's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The payment collection's updated at.
metadata:
type: object
description: The payment collection's metadata.
status:
type: string
description: The payment collection's status.
enum:
- canceled
- not_paid
- awaiting
- authorized
- partially_authorized
payment_providers:
type: array
description: The payment collection's payment providers.
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'
StorePaymentCollectionResponse:
type: object
description: SUMMARY
x-schemaName: StorePaymentCollectionResponse
required:
- payment_collection
properties:
payment_collection:
$ref: '#/components/schemas/StorePaymentCollection'
StorePaymentProvider:
type: object
description: The payment provider's payment providers.
x-schemaName: StorePaymentProvider
required:
- id
properties:
id:
type: string
title: id
description: The payment provider's ID.
StoreProduct:
type: object
description: The product's details.
x-schemaName: StoreProduct
required:
- length
- title
- status
- options
- description
- id
- created_at
- updated_at
- variants
- handle
- subtitle
- is_giftcard
- thumbnail
- width
- weight
- height
- origin_country
- hs_code
- mid_code
- material
- collection_id
- type_id
- images
- discountable
- external_id
- deleted_at
properties:
categories:
type: array
description: The product's categories.
items:
type: object
type:
type: object
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.
created_at:
type: string
format: date-time
title: created_at
description: The product's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The product's updated at.
variants:
type: array
description: The product's variants.
items:
$ref: '#/components/schemas/BaseProductVariant'
handle:
type: string
title: handle
description: The product's handle.
subtitle:
type: string
title: subtitle
description: The product's subtitle.
is_giftcard:
type: boolean
title: is_giftcard
description: The product's is giftcard.
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:
$ref: '#/components/schemas/BaseCollection'
collection_id:
type: string
title: collection_id
description: The product's collection id.
type_id:
type: string
title: type_id
description: The product's type id.
tags:
type: array
description: The product's tags.
items:
$ref: '#/components/schemas/BaseProductTag'
images:
type: array
description: The product's images.
items:
$ref: '#/components/schemas/BaseProductImage'
discountable:
type: boolean
title: discountable
description: The product's discountable.
external_id:
type: string
title: external_id
description: The product's external id.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The product's deleted at.
StoreProductCategory:
type: object
description: The category's categories.
x-schemaName: StoreProductCategory
required:
- id
- name
- description
- handle
- is_active
- is_internal
- rank
- parent_category_id
- parent_category
- category_children
- created_at
- updated_at
- deleted_at
properties:
products:
type: array
description: The category's products.
items:
$ref: '#/components/schemas/StoreProduct'
id:
type: string
title: id
description: The category's ID.
name:
type: string
title: name
description: The category's name.
description:
type: string
title: description
description: The category's description.
handle:
type: string
title: handle
description: The category's handle.
is_active:
type: boolean
title: is_active
description: The category's is active.
is_internal:
type: boolean
title: is_internal
description: The category's is internal.
rank:
type: number
title: rank
description: The category's rank.
parent_category_id:
type: string
title: parent_category_id
description: The category's parent category id.
parent_category:
$ref: '#/components/schemas/BaseProductCategory'
category_children:
type: array
description: The category's category children.
items:
$ref: '#/components/schemas/BaseProductCategory'
metadata:
type: object
description: The category's metadata.
created_at:
type: string
format: date-time
title: created_at
description: The category's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The category's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The category's deleted at.
StoreProductCategoryListResponse:
type: object
description: SUMMARY
x-schemaName: StoreProductCategoryListResponse
required:
- limit
- offset
- count
- product_categories
properties:
limit:
type: number
title: limit
description: The product category's limit.
offset:
type: number
title: offset
description: The product category's offset.
count:
type: number
title: count
description: The product category's count.
product_categories:
type: array
description: The product category's product categories.
items:
$ref: '#/components/schemas/StoreProductCategory'
StoreProductCategoryResponse:
type: object
description: SUMMARY
x-schemaName: StoreProductCategoryResponse
required:
- product_category
properties:
product_category:
$ref: '#/components/schemas/StoreProductCategory'
StoreProductResponse:
type: object
description: SUMMARY
x-schemaName: StoreProductResponse
required:
- product
properties:
product:
$ref: '#/components/schemas/StoreProduct'
StoreProductVariantParams:
type: object
description: The product's variants.
x-schemaName: StoreProductVariantParams
properties:
q:
type: string
title: q
description: The variant's q.
id:
oneOf:
- type: string
title: id
description: The variant's ID.
- type: array
description: The variant's ID.
items:
type: string
title: id
description: The id's ID.
sku:
oneOf:
- type: string
title: sku
description: The variant's sku.
- type: array
description: The variant's sku.
items:
type: string
title: sku
description: The sku's details.
product_id:
oneOf:
- type: string
title: product_id
description: The variant's product id.
- type: array
description: The variant's product id.
items:
type: string
title: product_id
description: The product id's details.
options:
type: object
description: The variant's options.
limit:
type: number
title: limit
description: The variant's limit.
offset:
type: number
title: offset
description: The variant's offset.
order:
type: string
title: order
description: The variant's order.
fields:
type: string
title: fields
description: The variant's fields.
$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
StoreRegion:
type: object
description: The region's details.
x-schemaName: StoreRegion
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.
StoreReturn:
type: object
description: The return's details.
x-schemaName: StoreReturn
required:
- id
- order_id
- order_version
- display_id
- items
- received_at
- created_at
- canceled_at
properties:
id:
type: string
title: id
description: The return's ID.
order_id:
type: string
title: order_id
description: The return's order id.
status:
type: string
title: status
description: The return's status.
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: The return's no notification.
refund_amount:
type: number
title: refund_amount
description: The return's refund amount.
items:
type: array
description: The return's items.
items:
$ref: '#/components/schemas/BaseReturnItem'
received_at:
type: string
title: received_at
description: The return's received at.
created_at:
type: string
format: date-time
title: created_at
description: The return's created at.
canceled_at:
type: string
title: canceled_at
description: The return's canceled at.
StoreReturnReason:
type: object
description: The return reason's details.
x-schemaName: StoreReturnReason
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.
created_at:
type: string
format: date-time
title: created_at
description: The return reason's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The return reason's updated at.
StoreReturnReasonResponse:
type: object
description: SUMMARY
x-schemaName: StoreReturnReasonResponse
required:
- return_reason
properties:
return_reason:
$ref: '#/components/schemas/StoreReturnReason'
StoreReturnResponse:
type: object
description: SUMMARY
x-schemaName: StoreReturnResponse
required:
- return
properties:
return:
$ref: '#/components/schemas/StoreReturn'
StoreShippingOption:
type: object
description: The shipping option's shipping options.
x-schemaName: StoreShippingOption
required:
- id
- name
- price_type
- service_zone_id
- provider_id
- provider
- shipping_option_type_id
- type
- shipping_profile_id
- amount
- is_tax_inclusive
- data
- metadata
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.
enum:
- flat
- calculated
service_zone_id:
type: string
title: service_zone_id
description: The shipping option's service zone id.
provider_id:
type: string
title: provider_id
description: The shipping option's provider id.
provider:
$ref: '#/components/schemas/BaseFulfillmentProvider'
shipping_option_type_id:
type: string
title: shipping_option_type_id
description: The shipping option's shipping option type id.
type:
type: object
shipping_profile_id:
type: string
title: shipping_profile_id
description: The shipping option's shipping profile id.
amount:
type: number
title: amount
description: The shipping option's amount.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The shipping option's is tax inclusive.
data:
type: object
description: The shipping option's data.
metadata:
type: object
description: The shipping option's metadata.
StoreShippingOptionListResponse:
type: object
description: SUMMARY
x-schemaName: StoreShippingOptionListResponse
required:
- shipping_options
properties:
shipping_options:
type: array
description: The shipping option's shipping options.
items:
$ref: '#/components/schemas/StoreShippingOption'
StoreUpdateCartLineItem:
type: object
description: SUMMARY
x-schemaName: StoreUpdateCartLineItem
required:
- quantity
- metadata
properties:
quantity:
type: number
title: quantity
description: The cart's quantity.
metadata:
type: object
description: The cart's metadata.
StoreUpdateCustomer:
type: object
description: SUMMARY
x-schemaName: StoreUpdateCustomer
required:
- company_name
- first_name
- last_name
- phone
properties:
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.
phone:
type: string
title: phone
description: The customer's phone.
UpdateAddress:
type: object
description: The cart's shipping address.
x-schemaName: UpdateAddress
required:
- id
properties:
id:
type: string
title: id
description: The shipping address's ID.
customer_id:
type: string
title: customer_id
description: The shipping address's customer id.
company:
type: string
title: company
description: The shipping address's company.
first_name:
type: string
title: first_name
description: The shipping address's first name.
last_name:
type: string
title: last_name
description: The shipping address's last name.
address_1:
type: string
title: address_1
description: The shipping address's address 1.
address_2:
type: string
title: address_2
description: The shipping address's address 2.
city:
type: string
title: city
description: The shipping address's city.
country_code:
type: string
title: country_code
description: The shipping address's country code.
province:
type: string
title: province
description: The shipping address's province.
postal_code:
type: string
title: postal_code
description: The shipping address's postal code.
phone:
type: string
title: phone
description: The shipping address's phone.
metadata:
type: object
description: The shipping address's metadata.
UpdateCartData:
type: object
description: SUMMARY
x-schemaName: UpdateCartData
properties:
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_id:
type: string
title: shipping_address_id
description: The cart's shipping address id.
billing_address_id:
type: string
title: billing_address_id
description: The cart's billing address id.
billing_address:
oneOf:
- $ref: '#/components/schemas/CreateAddress'
- $ref: '#/components/schemas/UpdateAddress'
shipping_address:
oneOf:
- $ref: '#/components/schemas/CreateAddress'
- $ref: '#/components/schemas/UpdateAddress'
metadata:
type: object
description: The cart's metadata.
UpdateOrderReturnReason:
type: object
description: SUMMARY
x-schemaName: UpdateOrderReturnReason
properties:
id:
type: string
title: id
description: The return reason's ID.
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.
WorkflowExecutionContext:
type: object
description: The workflow execution's context.
x-schemaName: WorkflowExecutionContext
required:
- compensate
- errors
properties:
data:
type: object
description: The context's data.
compensate:
type: object
description: The context's compensate.
errors:
type: array
description: The context's errors.
items:
type: object
description: The error's errors.
responses:
default_error:
description: Default Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: unknown_error
message: An unknown error occurred.
type: unknown_error
invalid_state_error:
description: Invalid State Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: unknown_error
message: The request conflicted with another request. You may retry the request with the provided Idempotency-Key.
type: QueryRunnerAlreadyReleasedError
invalid_request_error:
description: Invalid Request Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: invalid_request_error
message: Discount with code TEST already exists.
type: duplicate_error
not_found_error:
description: Not Found Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: Entity with id 1 was not found
type: not_found
400_error:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
not_allowed:
$ref: '#/components/examples/not_allowed_error'
invalid_data:
$ref: '#/components/examples/invalid_data_error'
500_error:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
database:
$ref: '#/components/examples/database_error'
unexpected_state:
$ref: '#/components/examples/unexpected_state_error'
invalid_argument:
$ref: '#/components/examples/invalid_argument_error'
default_error:
$ref: '#/components/examples/default_error'
unauthorized:
description: User is not authorized. Must log in first
content:
text/plain:
schema:
type: string
default: Unauthorized
example: Unauthorized
incorrect_credentials:
description: User does not exist or incorrect credentials
content:
text/plain:
schema:
type: string
default: Unauthorized
example: Unauthorized
examples:
not_allowed_error:
summary: Not Allowed Error
value:
message: Discount must be set to dynamic
type: not_allowed
invalid_data_error:
summary: Invalid Data Error
value:
message: first_name must be a string
type: invalid_data
multiple_errors:
summary: Multiple Errors
value:
message: Provided request body contains errors. Please check the data and retry the request
errors:
- message: first_name must be a string
type: invalid_data
- message: Discount must be set to dynamic
type: not_allowed
database_error:
summary: Database Error
value:
code: api_error
message: An error occured while hashing password
type: database_error
unexpected_state_error:
summary: Unexpected State Error
value:
message: cart.total must be defined
type: unexpected_state
invalid_argument_error:
summary: Invalid Argument Error
value:
message: cart.total must be defined
type: unexpected_state
default_error:
summary: Default Error
value:
code: unknown_error
message: An unknown error occurred.
type: unknown_error
securitySchemes:
api_token:
type: apiKey
x-displayName: API Token
in: header
name: x-medusa-access-token
jwt_token:
type: http
x-displayName: JWT Token
scheme: bearer
cookie_auth:
type: apiKey
in: cookie
name: connect.sid
x-displayName: Cookie Session ID