Files
medusa-store/www/apps/api-reference/specs/store/openapi.full.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

2994 lines
95 KiB
YAML

openapi: 3.0.0
info:
version: 2.0.0
title: Medusa Storefront API
license:
name: MIT
url: https://github.com/medusajs/medusa/blob/master/LICENSE
servers:
- url: http://localhost:9000
- url: https://api.medusa-commerce.com
tags:
- name: Carts
description: |
A cart is a virtual shopping bag that customers can use to add items they want to purchase.
A cart is then used to checkout and place an order.
externalDocs:
description: How to implement cart functionality in your storefront
url: https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-cart
- name: Currencies
- name: Customers
description: |
A customer can register and manage their information such as addresses, orders, payment methods, and more.
externalDocs:
description: How to implement customer profiles in your storefront
url: https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles
- name: Payment Collections
description: |
A payment collection is useful for managing additional payments, such as for Order Edits, or installment payments.
- name: Regions
description: |
Regions are different countries or geographical regions that the commerce store serves customers in.
Customers can choose what region they're in, which can be used to change the prices shown based on the region and its currency.
externalDocs:
description: How to use regions in a storefront
url: https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions
- name: Shipping Options
description: |
A shipping option is used to define the available shipping methods during checkout or when creating a return.
externalDocs:
description: Shipping Option architecture
url: https://docs.medusajs.com/modules/carts-and-checkout/shipping#shipping-option
paths:
/store/carts:
post:
operationId: PostCarts
summary: Create Cart
description: Create a cart.
x-authenticated: false
parameters: []
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/carts'
tags:
- Carts
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: {}
/store/carts/{id}:
get:
operationId: GetCartsId
summary: Get a Cart
description: Retrieve a cart by its ID. You can expand the cart's relations or select the fields that should be returned.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/carts/{id}'
tags:
- Carts
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: {}
post:
operationId: PostCartsId
summary: Update a Cart
description: Update a cart's details.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/carts/{id}'
tags:
- Carts
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: {}
/store/carts/{id}/line-items:
post:
operationId: PostCartsIdLineItems
summary: Add Line Items to Cart
description: Add a list of line items to a cart.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/carts/{id}/line-items'
tags:
- Carts
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: {}
/store/carts/{id}/line-items/{line_id}:
post:
operationId: PostCartsIdLineItemsLine_id
summary: Add Line Items to Cart
description: Add a list of line items to a cart.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
- name: line_id
in: path
description: The cart's line id.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}'
tags:
- Carts
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: {}
delete:
operationId: DeleteCartsIdLineItemsLine_id
summary: Remove Line Items from Cart
description: Remove a list of line items from a cart. This doesn't delete the Line Item, only the association between the Line Item and the cart.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
- name: line_id
in: path
description: The cart's line id.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}'
tags:
- Carts
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: {}
/store/carts/{id}/payment-collections:
post:
operationId: PostCartsIdPaymentCollections
summary: Add Payment Collections to Cart
description: Add a list of payment collections to a cart.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/carts/{id}/payment-collections'
tags:
- Carts
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: {}
/store/carts/{id}/promotions:
post:
operationId: PostCartsIdPromotions
summary: Add Promotions to Cart
description: Add a list of promotions to a cart.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/carts/{id}/promotions'
tags:
- Carts
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: {}
delete:
operationId: DeleteCartsIdPromotions
summary: Remove Promotions from Cart
description: Remove a list of promotions from a cart. This doesn't delete the Promotion, only the association between the Promotion and the cart.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X DELETE '{backend_url}/store/carts/{id}/promotions'
tags:
- Carts
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: {}
/store/carts/{id}/taxes:
post:
operationId: PostCartsIdTaxes
summary: Add Taxes to Cart
description: Add a list of taxes to a cart.
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StorePostCartsCartTaxesReq'
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/carts/{id}/taxes'
tags:
- Carts
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'
/store/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: false
parameters: []
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/currencies'
tags:
- Currencies
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: {}
/store/currencies/{code}:
get:
operationId: GetCurrenciesCode
summary: Get a Currency
description: Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned.
x-authenticated: false
parameters:
- name: code
in: path
description: The currency's code.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/currencies/{code}'
tags:
- Currencies
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: {}
/store/customers:
post:
operationId: PostCustomers
summary: Create Customer
description: Create a customer.
x-authenticated: false
parameters: []
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/customers'
tags:
- Customers
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: {}
/store/customers/me:
get:
operationId: GetCustomersMe
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: false
parameters: []
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/customers/me'
tags:
- Customers
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: {}
/store/customers/me/addresses:
get:
operationId: GetCustomersMeAddresses
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: false
parameters: []
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/customers/me/addresses'
tags:
- Customers
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: {}
post:
operationId: PostCustomersMeAddresses
summary: Create Customer
description: Create a customer.
x-authenticated: false
parameters: []
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/customers/me/addresses'
tags:
- Customers
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: {}
/store/customers/me/addresses/{address_id}:
get:
operationId: GetCustomersMeAddressesAddress_id
summary: List Addresses
description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated.
x-authenticated: false
parameters:
- name: address_id
in: path
description: The customer's address id.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/customers/me/addresses/{address_id}'
tags:
- Customers
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: {}
post:
operationId: PostCustomersMeAddressesAddress_id
summary: Add Addresses to Customer
description: Add a list of addresses to a customer.
x-authenticated: false
parameters:
- name: address_id
in: path
description: The customer's address id.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}'
tags:
- Customers
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: {}
delete:
operationId: DeleteCustomersMeAddressesAddress_id
summary: Remove Addresses from Customer
description: Remove a list of addresses from a customer. This doesn't delete the Address, only the association between the Address and the customer.
x-authenticated: false
parameters:
- name: address_id
in: path
description: The customer's address id.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}'
tags:
- Customers
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: {}
/store/payment-collections/{id}/payment-sessions:
post:
operationId: PostPaymentCollectionsIdPaymentSessions
summary: Add Payment Sessions to Payment Collection
description: Add a list of payment sessions to a payment collection.
x-authenticated: false
parameters:
- name: id
in: path
description: The payment collection's ID.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StorePostPaymentCollectionsPaymentSessionReq'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/store/payment-collections/{id}/payment-sessions' \
-H 'Content-Type: application/json' \
--data-raw '{
"provider_id": "{value}"
}'
tags:
- Payment Collections
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'
/store/regions:
get:
operationId: GetRegions
summary: List Regions
description: Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated.
x-authenticated: false
parameters: []
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/regions'
tags:
- Regions
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: {}
/store/regions/{id}:
get:
operationId: GetRegionsId
summary: Get a Region
description: Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned.
x-authenticated: false
parameters:
- name: id
in: path
description: The region's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/regions/{id}'
tags:
- Regions
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: {}
/store/regions/{id}/payment-providers:
get:
operationId: GetRegionsIdPaymentProviders
summary: List Payment Providers
description: Retrieve a list of payment providers in a region. The payment providers can be filtered by fields like FILTER FIELDS. The payment providers can also be paginated.
x-authenticated: false
parameters:
- name: id
in: path
description: The region's ID.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/regions/{id}/payment-providers'
tags:
- Regions
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: {}
/store/shipping-options/{cart_id}:
get:
operationId: GetShippingOptionsCart_id
summary: Get a Shipping Option
description: Retrieve a shipping option by its ID. You can expand the shipping option's relations or select the fields that should be returned.
x-authenticated: false
parameters:
- name: cart_id
in: path
description: The shipping option's cart id.
required: true
schema:
type: string
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/shipping-options/{cart_id}'
tags:
- Shipping Options
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: {}
components:
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 or Multiple Errors
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Error'
- $ref: '#/components/schemas/MultipleErrors'
examples:
not_allowed:
$ref: '#/components/examples/not_allowed_error'
invalid_data:
$ref: '#/components/examples/invalid_data_error'
MultipleErrors:
$ref: '#/components/examples/multiple_errors'
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:
jwt_token:
type: http
x-displayName: JWT Token
scheme: bearer
cookie_auth:
type: apiKey
x-displayName: Cookie Session ID
in: cookie
name: connect.sid
description: |
Use a cookie session to send authenticated requests.
### How to Obtain the Cookie Session
If you're sending requests through a browser, using JS Client, or using tools like Postman, the cookie session should be automatically set when the customer is logged in.
If you're sending requests using cURL, you must set the Session ID in the cookie manually.
To do that, send a request to [authenticate the customer](#tag/Auth/operation/PostAuth) and pass the cURL option `-v`:
```bash
curl -v --location --request POST 'https://medusa-url.com/store/auth' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
"password": "supersecret"
}'
```
The headers will be logged in the terminal as well as the response. You should find in the headers a Cookie header similar to this:
```bash
Set-Cookie: connect.sid=s%3A2Bu8BkaP9JUfHu9rG59G16Ma0QZf6Gj1.WT549XqX37PN8n0OecqnMCq798eLjZC5IT7yiDCBHPM;
```
Copy the value after `connect.sid` (without the `;` at the end) and pass it as a cookie in subsequent requests as the following:
```bash
curl --location --request GET 'https://medusa-url.com/store/customers/me/orders' \
--header 'Cookie: connect.sid={sid}'
```
Where `{sid}` is the value of `connect.sid` that you copied.
schemas:
AdminDeletePricingRuleTypesRuleTypeReq:
type: object
description: SUMMARY
x-schemaName: AdminDeletePricingRuleTypesRuleTypeReq
properties: {}
AdminGetPricingRuleTypesParams:
type: object
description: SUMMARY
x-schemaName: AdminGetPricingRuleTypesParams
properties:
rule_attribute:
type: array
description: The pricing's rule attribute.
items:
type: string
title: rule_attribute
description: The rule attribute's details.
expand:
type: string
title: expand
description: The pricing's expand.
fields:
type: string
title: fields
description: The pricing's fields.
offset:
type: number
title: offset
description: The pricing's offset.
limit:
type: number
title: limit
description: The pricing's limit.
order:
type: string
title: order
description: The pricing's order.
AdminGetPricingRuleTypesRuleTypeParams:
type: object
description: SUMMARY
x-schemaName: AdminGetPricingRuleTypesRuleTypeParams
properties:
expand:
type: string
title: expand
description: The pricing's expand.
fields:
type: string
title: fields
description: The pricing's fields.
AdminGetProductsParams:
type: object
description: SUMMARY
x-schemaName: AdminGetProductsParams
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.
status:
type: array
description: The product's status.
items: {}
title:
type: string
title: title
description: The product's title.
handle:
type: string
title: handle
description: The product's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The product's is giftcard.
price_list_id:
type: array
description: The product's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The product's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The product's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The product's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The product's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The product's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The product's $and.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $and's q.
id:
oneOf:
- type: string
title: id
description: The $and's ID.
- type: array
description: The $and's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $and's status.
items: {}
title:
type: string
title: title
description: The $and's title.
handle:
type: string
title: handle
description: The $and's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $and's is giftcard.
price_list_id:
type: array
description: The $and's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $and's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $and's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $and's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $and's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $and's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $and's details.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $and's q.
id:
oneOf:
- type: string
title: id
description: The $and's ID.
- type: array
description: The $and's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $and's status.
items: {}
title:
type: string
title: title
description: The $and's title.
handle:
type: string
title: handle
description: The $and's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $and's is giftcard.
price_list_id:
type: array
description: The $and's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $and's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $and's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $and's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $and's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $and's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $and's details.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties: {}
$or:
type: array
description: The $and's $or.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties: {}
expand:
type: string
title: expand
description: The $and's expand.
fields:
type: string
title: fields
description: The $and's fields.
offset:
type: number
title: offset
description: The $and's offset.
limit:
type: number
title: limit
description: The $and's limit.
order:
type: string
title: order
description: The $and's order.
$or:
type: array
description: The $and's $or.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $or's q.
id:
oneOf:
- type: string
title: id
description: The $or's ID.
- type: array
description: The $or's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $or's status.
items: {}
title:
type: string
title: title
description: The $or's title.
handle:
type: string
title: handle
description: The $or's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $or's is giftcard.
price_list_id:
type: array
description: The $or's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $or's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $or's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $or's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $or's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $or's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $or's $and.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties: {}
$or:
type: array
description: The $or's details.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties: {}
expand:
type: string
title: expand
description: The $or's expand.
fields:
type: string
title: fields
description: The $or's fields.
offset:
type: number
title: offset
description: The $or's offset.
limit:
type: number
title: limit
description: The $or's limit.
order:
type: string
title: order
description: The $or's order.
expand:
type: string
title: expand
description: The $and's expand.
fields:
type: string
title: fields
description: The $and's fields.
offset:
type: number
title: offset
description: The $and's offset.
limit:
type: number
title: limit
description: The $and's limit.
order:
type: string
title: order
description: The $and's order.
$or:
type: array
description: The product's $or.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $or's q.
id:
oneOf:
- type: string
title: id
description: The $or's ID.
- type: array
description: The $or's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $or's status.
items: {}
title:
type: string
title: title
description: The $or's title.
handle:
type: string
title: handle
description: The $or's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $or's is giftcard.
price_list_id:
type: array
description: The $or's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $or's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $or's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $or's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $or's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $or's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $or's $and.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $and's q.
id:
oneOf:
- type: string
title: id
description: The $and's ID.
- type: array
description: The $and's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $and's status.
items: {}
title:
type: string
title: title
description: The $and's title.
handle:
type: string
title: handle
description: The $and's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $and's is giftcard.
price_list_id:
type: array
description: The $and's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $and's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $and's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $and's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $and's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $and's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $and's details.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties: {}
$or:
type: array
description: The $and's $or.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties: {}
expand:
type: string
title: expand
description: The $and's expand.
fields:
type: string
title: fields
description: The $and's fields.
offset:
type: number
title: offset
description: The $and's offset.
limit:
type: number
title: limit
description: The $and's limit.
order:
type: string
title: order
description: The $and's order.
$or:
type: array
description: The $or's details.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $or's q.
id:
oneOf:
- type: string
title: id
description: The $or's ID.
- type: array
description: The $or's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $or's status.
items: {}
title:
type: string
title: title
description: The $or's title.
handle:
type: string
title: handle
description: The $or's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $or's is giftcard.
price_list_id:
type: array
description: The $or's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $or's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $or's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $or's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $or's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $or's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $or's $and.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties: {}
$or:
type: array
description: The $or's details.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties: {}
expand:
type: string
title: expand
description: The $or's expand.
fields:
type: string
title: fields
description: The $or's fields.
offset:
type: number
title: offset
description: The $or's offset.
limit:
type: number
title: limit
description: The $or's limit.
order:
type: string
title: order
description: The $or's order.
expand:
type: string
title: expand
description: The $or's expand.
fields:
type: string
title: fields
description: The $or's fields.
offset:
type: number
title: offset
description: The $or's offset.
limit:
type: number
title: limit
description: The $or's limit.
order:
type: string
title: order
description: The $or's order.
expand:
type: string
title: expand
description: The product's expand.
fields:
type: string
title: fields
description: The product's fields.
offset:
type: number
title: offset
description: The product's offset.
limit:
type: number
title: limit
description: The product's limit.
order:
type: string
title: order
description: The product's order.
AdminGetPromotionsParams:
type: object
description: SUMMARY
x-schemaName: AdminGetPromotionsParams
properties:
code:
type: string
title: code
description: The promotion's code.
expand:
type: string
title: expand
description: The promotion's expand.
fields:
type: string
title: fields
description: The promotion's fields.
offset:
type: number
title: offset
description: The promotion's offset.
limit:
type: number
title: limit
description: The promotion's limit.
order:
type: string
title: order
description: The promotion's order.
AdminPostCampaignsReq:
type: object
description: The promotion's campaign.
x-schemaName: AdminPostCampaignsReq
required:
- name
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.
currency:
type: string
title: currency
description: The campaign's currency.
budget:
$ref: '#/components/schemas/CampaignBudget'
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.
promotions:
type: array
description: The campaign's promotions.
items:
type: object
description: The promotion's promotions.
x-schemaName: IdObject
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
AdminPostCustomerGroupsGroupCustomersBatchReq:
type: object
description: SUMMARY
x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq
required:
- customer_ids
properties:
customer_ids:
type: array
description: The customer group's customer ids.
items:
type: object
description: The customer id's customer ids.
x-schemaName: CustomerGroupsBatchCustomer
required:
- id
properties:
id:
type: string
title: id
description: The customer id's ID.
AdminPostFulfillmentShippingOptionsRulesBatchAddReq:
type: object
description: SUMMARY
x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchAddReq
required:
- rules
properties:
rules:
type: array
description: The fulfillment's rules.
items:
type: object
description: The rule's rules.
x-schemaName: FulfillmentRuleCreate
required:
- operator
- attribute
- value
properties:
operator: {}
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.
AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq:
type: object
description: SUMMARY
x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq
required:
- rule_ids
properties:
rule_ids:
type: array
description: The fulfillment's rule ids.
items:
type: string
title: rule_ids
description: The rule id's rule ids.
AdminPostInventoryItemsInventoryItemReq:
type: object
description: SUMMARY
x-schemaName: AdminPostInventoryItemsInventoryItemReq
properties:
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.
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.
height:
type: number
title: height
description: The inventory item's height.
length:
type: number
title: length
description: The inventory item's length.
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.
requires_shipping:
type: boolean
title: requires_shipping
description: The inventory item's requires shipping.
AdminPostInventoryItemsItemLocationLevelsLevelReq:
type: object
description: SUMMARY
x-schemaName: AdminPostInventoryItemsItemLocationLevelsLevelReq
properties:
incoming_quantity:
type: number
title: incoming_quantity
description: The inventory item's incoming quantity.
stocked_quantity:
type: number
title: stocked_quantity
description: The inventory item's stocked quantity.
AdminPostInventoryItemsItemLocationLevelsReq:
type: object
description: SUMMARY
x-schemaName: AdminPostInventoryItemsItemLocationLevelsReq
required:
- location_id
- stocked_quantity
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.
AdminPostInventoryItemsReq:
type: object
description: SUMMARY
x-schemaName: AdminPostInventoryItemsReq
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.
thumbnail:
type: string
title: thumbnail
description: The inventory item's thumbnail.
metadata:
type: object
description: The inventory item's metadata.
properties: {}
AdminPostInvitesInviteAcceptReq:
type: object
description: SUMMARY
x-schemaName: AdminPostInvitesInviteAcceptReq
required:
- first_name
- last_name
properties:
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.
AdminPostPaymentsCapturesReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPaymentsCapturesReq
properties:
amount:
type: number
title: amount
description: The payment's amount.
AdminPostPaymentsRefundsReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPaymentsRefundsReq
properties:
amount:
type: number
title: amount
description: The payment's amount.
AdminPostPriceListsPriceListPricesBatchAddReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPriceListsPriceListPricesBatchAddReq
required:
- prices
properties:
prices:
type: array
description: The price list's prices.
items:
type: object
description: The price's prices.
x-schemaName: AdminPriceListPricesCreateReq
required:
- currency_code
- amount
- variant_id
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.
properties: {}
AdminPostPriceListsPriceListPricesBatchRemoveReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPriceListsPriceListPricesBatchRemoveReq
required:
- ids
properties:
ids:
type: array
description: The price list's ids.
items:
type: string
title: ids
description: The id's ids.
AdminPostPriceListsPriceListReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPriceListsPriceListReq
required:
- prices
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: {}
prices:
type: array
description: The price list's prices.
items:
type: object
description: The price's prices.
x-schemaName: AdminPriceListPricesCreateReq
required:
- currency_code
- amount
- variant_id
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.
properties: {}
rules:
type: object
description: The price list's rules.
properties: {}
AdminPostPriceListsReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPriceListsReq
required:
- title
- description
- type
- prices
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: {}
prices:
type: array
description: The price list's prices.
items:
type: object
description: The price's prices.
x-schemaName: AdminPriceListPricesCreateReq
required:
- currency_code
- amount
- variant_id
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.
properties: {}
rules:
type: object
description: The price list's rules.
properties: {}
AdminPostPricingRuleTypesReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPricingRuleTypesReq
required:
- name
- rule_attribute
- default_priority
properties:
name:
type: string
title: name
description: The pricing's name.
rule_attribute:
type: string
title: rule_attribute
description: The pricing's rule attribute.
default_priority:
type: number
title: default_priority
description: The pricing's default priority.
AdminPostPricingRuleTypesRuleTypeReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPricingRuleTypesRuleTypeReq
properties:
name:
type: string
title: name
description: The pricing's name.
rule_attribute:
type: string
title: rule_attribute
description: The pricing's rule attribute.
default_priority:
type: number
title: default_priority
description: The pricing's default priority.
AdminPostPromotionsPromotionReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPromotionsPromotionReq
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: {}
campaign_id:
type: string
title: campaign_id
description: The promotion's campaign id.
campaign:
$ref: '#/components/schemas/AdminPostCampaignsReq'
application_method:
$ref: '#/components/schemas/ApplicationMethodsMethodPostReq'
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
x-schemaName: PromotionRule
required:
- operator
- attribute
- values
properties:
operator: {}
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
values:
type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
AdminPostPromotionsPromotionRulesBatchAddReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPromotionsPromotionRulesBatchAddReq
required:
- rules
properties:
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
x-schemaName: PromotionRule
required:
- operator
- attribute
- values
properties:
operator: {}
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
values:
type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
AdminPostPromotionsPromotionRulesBatchRemoveReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPromotionsPromotionRulesBatchRemoveReq
required:
- rule_ids
properties:
rule_ids:
type: array
description: The promotion's rule ids.
items:
type: string
title: rule_ids
description: The rule id's rule ids.
AdminPostPromotionsPromotionRulesBatchUpdateReq:
type: object
description: SUMMARY
x-schemaName: AdminPostPromotionsPromotionRulesBatchUpdateReq
required:
- rules
properties:
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
x-schemaName: UpdatePromotionRule
required:
- id
- attribute
- values
properties:
id:
type: string
title: id
description: The rule's ID.
operator: {}
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
values:
type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
AdminPostStockLocationsReq:
type: object
description: SUMMARY
x-schemaName: AdminPostStockLocationsReq
required:
- name
properties:
name:
type: string
title: name
description: The stock location's name.
address:
$ref: '#/components/schemas/StockLocationAddress'
address_id:
type: string
title: address_id
description: The stock location's address id.
metadata:
type: object
description: The stock location's metadata.
properties: {}
AdminPostTaxRatesReq:
type: object
description: SUMMARY
x-schemaName: AdminPostTaxRatesReq
required:
- name
- tax_region_id
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.
x-schemaName: CreateTaxRateRule
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.
tax_region_id:
type: string
title: tax_region_id
description: The tax rate's tax region id.
metadata:
type: object
description: The tax rate's metadata.
properties: {}
AdminPostTaxRatesTaxRateReq:
type: object
description: SUMMARY
x-schemaName: AdminPostTaxRatesTaxRateReq
properties:
code:
type: string
title: code
description: The tax rate's code.
name:
type: string
title: name
description: The tax rate's name.
region_id:
type: string
title: region_id
description: The tax rate's region id.
rate:
type: number
title: rate
description: The tax rate's rate.
products:
type: array
description: The tax rate's products.
items:
type: string
title: products
description: The product's products.
shipping_options:
type: array
description: The tax rate's shipping options.
items:
type: string
title: shipping_options
description: The shipping option's shipping options.
product_types:
type: array
description: The tax rate's product types.
items:
type: string
title: product_types
description: The product type's product types.
AdminPostTaxRatesTaxRateRulesReq:
type: object
description: SUMMARY
x-schemaName: AdminPostTaxRatesTaxRateRulesReq
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.
AdminPostTaxRegionsReq:
type: object
description: SUMMARY
x-schemaName: AdminPostTaxRegionsReq
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:
$ref: '#/components/schemas/CreateDefaultTaxRate'
metadata:
type: object
description: The tax region's metadata.
properties: {}
AdminPostWorkflowsAsyncResponseReq:
type: object
description: SUMMARY
x-schemaName: AdminPostWorkflowsAsyncResponseReq
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: {}
AdminPostWorkflowsRunReq:
type: object
description: SUMMARY
x-schemaName: AdminPostWorkflowsRunReq
properties:
input: {}
transaction_id:
type: string
title: transaction_id
description: The workflows execution's transaction id.
AdminUpdateUserRequest:
type: object
description: SUMMARY
x-schemaName: AdminUpdateUserRequest
required:
- 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.
ApplicationMethodsMethodPostReq:
type: object
description: The promotion's application method.
x-schemaName: ApplicationMethodsMethodPostReq
properties:
description:
type: string
title: description
description: The application method's description.
value:
type: string
title: value
description: The application method's value.
max_quantity:
type: number
title: max_quantity
description: The application method's max quantity.
type: {}
target_type: {}
allocation: {}
target_rules:
type: array
description: The application method's target rules.
items:
type: object
description: The target rule's target rules.
x-schemaName: PromotionRule
required:
- operator
- attribute
- values
properties:
operator: {}
description:
type: string
title: description
description: The target rule's description.
attribute:
type: string
title: attribute
description: The target rule's attribute.
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.
x-schemaName: PromotionRule
required:
- operator
- attribute
- values
properties:
operator: {}
description:
type: string
title: description
description: The buy rule's description.
attribute:
type: string
title: attribute
description: The buy rule's attribute.
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.
CampaignBudget:
type: object
description: The campaign's budget.
x-schemaName: CampaignBudget
properties:
type: {}
limit:
type: number
title: limit
description: The budget's limit.
CreateDefaultTaxRate:
type: object
description: The tax region's default tax rate.
x-schemaName: CreateDefaultTaxRate
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.
metadata:
type: object
description: The default tax rate's metadata.
properties: {}
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
MultipleErrors:
title: Multiple Errors
type: object
properties:
errors:
type: array
description: Array of errors
items:
$ref: '#/components/schemas/Error'
message:
type: string
default: Provided request body contains errors. Please check the data and retry the request
StockLocationAddress:
type: object
description: The stock location's address.
x-schemaName: StockLocationAddress
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.
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.
StorePostCartsCartTaxesReq:
type: object
description: SUMMARY
x-schemaName: StorePostCartsCartTaxesReq
properties: {}
StorePostPaymentCollectionsPaymentSessionReq:
type: object
description: SUMMARY
x-schemaName: StorePostPaymentCollectionsPaymentSessionReq
required:
- provider_id
properties:
provider_id:
type: string
title: provider_id
description: The payment collection's provider id.
context: {}
data:
type: object
description: The payment collection's data.
properties: {}