Files
medusa-store/www/apps/api-reference/specs/admin/openapi.yaml
Shahed Nasser 22f30f54fd docs: update api-reference project for v2 (#7307)
* remove everything v1 and make v2 default

* move main v2 rewrites to book

* move rewrites to book + other fixes
2024-05-16 09:02:35 +02:00

295 lines
12 KiB
YAML

openapi: 3.0.0
info:
version: 2.0.0
title: Medusa Admin API
license:
name: MIT
url: https://github.com/medusajs/medusa/blob/master/LICENSE
servers:
- url: http://localhost:9000
- url: https://api.medusa-commerce.com
tags:
- name: Api Keys
- name: Campaigns
- name: Collections
- name: Currencies
description: >
A store can use unlimited currencies, and each region must be associated
with at least one currency.
Currencies are defined within the Medusa backend. Currency API Routes
allow admins to list and update currencies.
externalDocs:
description: How to manage currencies
url: >-
https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-currencies
- name: Customer Groups
description: >
Customer Groups can be used to organize customers that share similar data
or attributes into dedicated groups.
This can be useful for different purposes such as setting a different
price for a specific customer group.
externalDocs:
description: How to manage customer groups
url: https://docs.medusajs.com/modules/customers/admin/manage-customer-groups
- name: Customers
description: >
Customers can either be created when they register through the Store APIs,
or created by the admin using the Admin APIs.
externalDocs:
description: How to manage customers
url: https://docs.medusajs.com/modules/customers/admin/manage-customers
- name: Fulfillment
- name: Inventory Items
description: >
Inventory items, provided by the [Inventory
Module](https://docs.medusajs.com/modules/multiwarehouse/inventory-module),
can be used to manage the inventory of saleable items in your store.
externalDocs:
description: How to manage inventory items
url: >-
https://docs.medusajs.com/modules/multiwarehouse/admin/manage-inventory-items
- name: Invites
description: >
An admin can invite new users to manage their team. This would allow new
users to authenticate as admins and perform admin functionalities.
externalDocs:
description: How to manage invites
url: https://docs.medusajs.com/modules/users/admin/manage-invites
- name: Payments
description: >
A payment can be related to an order, swap, return, or more. It can be
captured or refunded.
- name: Price Lists
description: >
A price list are special prices applied to products based on a set of
conditions, such as customer group.
externalDocs:
description: How to manage price lists
url: https://docs.medusajs.com/modules/price-lists/admin/manage-price-lists
- name: Pricing
- name: Products
description: >
Products are saleable items in a store. This also includes [saleable gift
cards](https://docs.medusajs.com/modules/gift-cards/admin/manage-gift-cards#manage-gift-card-product)
in a store.
externalDocs:
description: How to manage products
url: https://docs.medusajs.com/modules/products/admin/manage-products
- name: Promotions
- name: Regions
description: >
Regions are different countries or geographical regions that the commerce
store serves customers in.
Admins can manage these regions, their providers, and more.
externalDocs:
description: How to manage regions
url: >-
https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-regions
- name: Sales Channels
description: >
A sales channel indicates a channel where products can be sold in. For
example, a webshop or a mobile app.
Admins can manage sales channels and the products available in them.
externalDocs:
description: How to manage sales channels
url: https://docs.medusajs.com/modules/sales-channels/admin/manage
- name: Stock Locations
- name: Stores
- name: Tax Rates
description: >
Each region has at least a default tax rate. Admins can create and manage
additional tax rates that can be applied for certain conditions, such as
for specific product types.
externalDocs:
description: How to manage tax rates
url: https://docs.medusajs.com/modules/taxes/admin/manage-tax-rates
- name: Tax Regions
- name: Users
description: >
A store can have more than one user, each having the same privileges.
Admins can manage users, their passwords, and more.
externalDocs:
description: How to manage users
url: https://docs.medusajs.com/modules/users/admin/manage-users
- name: Workflows Executions
paths:
/admin/api-keys:
$ref: paths/admin_api-keys.yaml
/admin/api-keys/{id}:
$ref: paths/admin_api-keys_{id}.yaml
/admin/api-keys/{id}/revoke:
$ref: paths/admin_api-keys_{id}_revoke.yaml
/admin/campaigns:
$ref: paths/admin_campaigns.yaml
/admin/campaigns/{id}:
$ref: paths/admin_campaigns_{id}.yaml
/admin/collections:
$ref: paths/admin_collections.yaml
/admin/collections/{id}:
$ref: paths/admin_collections_{id}.yaml
/admin/currencies:
$ref: paths/admin_currencies.yaml
/admin/currencies/{code}:
$ref: paths/admin_currencies_{code}.yaml
/admin/customer-groups:
$ref: paths/admin_customer-groups.yaml
/admin/customer-groups/{id}:
$ref: paths/admin_customer-groups_{id}.yaml
/admin/customer-groups/{id}/customers:
$ref: paths/admin_customer-groups_{id}_customers.yaml
/admin/customer-groups/{id}/customers/batch:
$ref: paths/admin_customer-groups_{id}_customers_batch.yaml
/admin/customer-groups/{id}/customers/remove:
$ref: paths/admin_customer-groups_{id}_customers_remove.yaml
/admin/customers:
$ref: paths/admin_customers.yaml
/admin/customers/{id}:
$ref: paths/admin_customers_{id}.yaml
/admin/customers/{id}/addresses:
$ref: paths/admin_customers_{id}_addresses.yaml
/admin/customers/{id}/addresses/{address_id}:
$ref: paths/admin_customers_{id}_addresses_{address_id}.yaml
/admin/fulfillment/shipping-options/{id}/rules/batch/add:
$ref: paths/admin_fulfillment_shipping-options_{id}_rules_batch_add.yaml
/admin/fulfillment/shipping-options/{id}/rules/batch/remove:
$ref: paths/admin_fulfillment_shipping-options_{id}_rules_batch_remove.yaml
/admin/inventory-items:
$ref: paths/admin_inventory-items.yaml
/admin/inventory-items/{id}:
$ref: paths/admin_inventory-items_{id}.yaml
/admin/inventory-items/{id}/location-levels:
$ref: paths/admin_inventory-items_{id}_location-levels.yaml
/admin/inventory-items/{id}/location-levels/{location_id}:
$ref: paths/admin_inventory-items_{id}_location-levels_{location_id}.yaml
/admin/invites:
$ref: paths/admin_invites.yaml
/admin/invites/accept:
$ref: paths/admin_invites_accept.yaml
/admin/invites/{id}:
$ref: paths/admin_invites_{id}.yaml
/admin/invites/{id}/resend:
$ref: paths/admin_invites_{id}_resend.yaml
/admin/payments:
$ref: paths/admin_payments.yaml
/admin/payments/{id}:
$ref: paths/admin_payments_{id}.yaml
/admin/payments/{id}/capture:
$ref: paths/admin_payments_{id}_capture.yaml
/admin/payments/{id}/refund:
$ref: paths/admin_payments_{id}_refund.yaml
/admin/price-lists:
$ref: paths/admin_price-lists.yaml
/admin/price-lists/{id}:
$ref: paths/admin_price-lists_{id}.yaml
/admin/price-lists/{id}/prices/batch/add:
$ref: paths/admin_price-lists_{id}_prices_batch_add.yaml
/admin/price-lists/{id}/prices/batch/remove:
$ref: paths/admin_price-lists_{id}_prices_batch_remove.yaml
/admin/pricing/rule-types:
$ref: paths/admin_pricing_rule-types.yaml
/admin/pricing/rule-types/{id}:
$ref: paths/admin_pricing_rule-types_{id}.yaml
/admin/products:
$ref: paths/admin_products.yaml
/admin/products/{id}:
$ref: paths/admin_products_{id}.yaml
/admin/products/{id}/options:
$ref: paths/admin_products_{id}_options.yaml
/admin/products/{id}/options/{option_id}:
$ref: paths/admin_products_{id}_options_{option_id}.yaml
/admin/products/{id}/variants:
$ref: paths/admin_products_{id}_variants.yaml
/admin/products/{id}/variants/{variant_id}:
$ref: paths/admin_products_{id}_variants_{variant_id}.yaml
/admin/promotions:
$ref: paths/admin_promotions.yaml
/admin/promotions/{id}:
$ref: paths/admin_promotions_{id}.yaml
/admin/promotions/{id}/buy-rules/batch/add:
$ref: paths/admin_promotions_{id}_buy-rules_batch_add.yaml
/admin/promotions/{id}/buy-rules/batch/remove:
$ref: paths/admin_promotions_{id}_buy-rules_batch_remove.yaml
/admin/promotions/{id}/rules/batch/add:
$ref: paths/admin_promotions_{id}_rules_batch_add.yaml
/admin/promotions/{id}/rules/batch/remove:
$ref: paths/admin_promotions_{id}_rules_batch_remove.yaml
/admin/promotions/{id}/rules/batch/update:
$ref: paths/admin_promotions_{id}_rules_batch_update.yaml
/admin/promotions/{id}/target-rules/batch/add:
$ref: paths/admin_promotions_{id}_target-rules_batch_add.yaml
/admin/promotions/{id}/target-rules/batch/remove:
$ref: paths/admin_promotions_{id}_target-rules_batch_remove.yaml
/admin/regions:
$ref: paths/admin_regions.yaml
/admin/regions/{id}:
$ref: paths/admin_regions_{id}.yaml
/admin/sales-channels:
$ref: paths/admin_sales-channels.yaml
/admin/sales-channels/{id}:
$ref: paths/admin_sales-channels_{id}.yaml
/admin/sales-channels/{id}/products/batch/add:
$ref: paths/admin_sales-channels_{id}_products_batch_add.yaml
/admin/stock-locations:
$ref: paths/admin_stock-locations.yaml
/admin/stock-locations/{id}:
$ref: paths/admin_stock-locations_{id}.yaml
/admin/stores:
$ref: paths/admin_stores.yaml
/admin/stores/{id}:
$ref: paths/admin_stores_{id}.yaml
/admin/tax-rates:
$ref: paths/admin_tax-rates.yaml
/admin/tax-rates/{id}:
$ref: paths/admin_tax-rates_{id}.yaml
/admin/tax-rates/{id}/rules:
$ref: paths/admin_tax-rates_{id}_rules.yaml
/admin/tax-rates/{id}/rules/{rule_id}:
$ref: paths/admin_tax-rates_{id}_rules_{rule_id}.yaml
/admin/tax-regions:
$ref: paths/admin_tax-regions.yaml
/admin/tax-regions/{id}:
$ref: paths/admin_tax-regions_{id}.yaml
/admin/users:
$ref: paths/admin_users.yaml
/admin/users/me:
$ref: paths/admin_users_me.yaml
/admin/users/{id}:
$ref: paths/admin_users_{id}.yaml
/admin/workflows-executions:
$ref: paths/admin_workflows-executions.yaml
/admin/workflows-executions/{id}:
$ref: paths/admin_workflows-executions_{id}.yaml
/admin/workflows-executions/{workflow_id}/run:
$ref: paths/admin_workflows-executions_{workflow_id}_run.yaml
/admin/workflows-executions/{workflow_id}/steps/failure:
$ref: paths/admin_workflows-executions_{workflow_id}_steps_failure.yaml
/admin/workflows-executions/{workflow_id}/steps/success:
$ref: paths/admin_workflows-executions_{workflow_id}_steps_success.yaml
/admin/workflows-executions/{workflow_id}/subscribe:
$ref: paths/admin_workflows-executions_{workflow_id}_subscribe.yaml
/admin/workflows-executions/{workflow_id}/{transaction_id}:
$ref: paths/admin_workflows-executions_{workflow_id}_{transaction_id}.yaml
/admin/workflows-executions/{workflow_id}/{transaction_id}/{step_id}/subscribe:
$ref: >-
paths/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe.yaml
components:
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