chore(docs): Updated API Reference (v2) (#7999)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
This commit is contained in:
1 parent
1c6d1c28ff
commit
6c7a0129e3
14 files changed
+1031
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
curl '{backend_url}/admin/price-preferences' \
|
||||||
|
-H 'x-medusa-access-token: {api_token}'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl -X POST '{backend_url}/admin/price-preferences' \
|
||||||
|
-H 'x-medusa-access-token: {api_token}'
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
curl -X DELETE '{backend_url}/admin/price-preferences/{id}' \
|
||||||
|
-H 'x-medusa-access-token: {api_token}'
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
curl '{backend_url}/admin/price-preferences/{id}' \
|
||||||
|
-H 'x-medusa-access-token: {api_token}'
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
curl -X POST '{backend_url}/admin/price-preferences/{id}' \
|
||||||
|
-H 'x-medusa-access-token: {api_token}'
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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.
|
||||||
@@ -50,6 +50,7 @@ tags:
|
|||||||
- name: Orders
|
- name: Orders
|
||||||
- name: Payments
|
- name: Payments
|
||||||
- name: Price Lists
|
- name: Price Lists
|
||||||
|
- name: Price Preferences
|
||||||
- name: Product Categories
|
- name: Product Categories
|
||||||
x-associatedSchema:
|
x-associatedSchema:
|
||||||
$ref: '#/components/schemas/AdminProductCategory'
|
$ref: '#/components/schemas/AdminProductCategory'
|
||||||
@@ -8861,6 +8862,431 @@ paths:
|
|||||||
$ref: '#/components/responses/invalid_request_error'
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
|
/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 `-`.
|
||||||
|
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
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/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
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/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/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
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/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
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/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: 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
|
||||||
|
- 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/price-preferences/{id}' \
|
||||||
|
-H 'x-medusa-access-token: {api_token}'
|
||||||
|
tags:
|
||||||
|
- Price Preferences
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
/admin/product-categories:
|
/admin/product-categories:
|
||||||
get:
|
get:
|
||||||
operationId: GetProductCategories
|
operationId: GetProductCategories
|
||||||
@@ -38551,6 +38977,23 @@ components:
|
|||||||
rules:
|
rules:
|
||||||
type: object
|
type: object
|
||||||
description: The price's rules.
|
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:
|
AdminCreateProduct:
|
||||||
type: object
|
type: object
|
||||||
description: The create's details.
|
description: The create's details.
|
||||||
@@ -40815,6 +41258,23 @@ components:
|
|||||||
rules:
|
rules:
|
||||||
type: object
|
type: object
|
||||||
description: The price list's rules.
|
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:
|
AdminUpdateProduct:
|
||||||
type: object
|
type: object
|
||||||
description: The update's details.
|
description: The update's details.
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ tags:
|
|||||||
- name: Orders
|
- name: Orders
|
||||||
- name: Payments
|
- name: Payments
|
||||||
- name: Price Lists
|
- name: Price Lists
|
||||||
|
- name: Price Preferences
|
||||||
- name: Product Categories
|
- name: Product Categories
|
||||||
x-associatedSchema:
|
x-associatedSchema:
|
||||||
$ref: ./components/schemas/AdminProductCategory.yaml
|
$ref: ./components/schemas/AdminProductCategory.yaml
|
||||||
@@ -211,6 +212,10 @@ paths:
|
|||||||
$ref: paths/admin_price-lists_{id}_prices_batch.yaml
|
$ref: paths/admin_price-lists_{id}_prices_batch.yaml
|
||||||
/admin/price-lists/{id}/products:
|
/admin/price-lists/{id}/products:
|
||||||
$ref: paths/admin_price-lists_{id}_products.yaml
|
$ref: paths/admin_price-lists_{id}_products.yaml
|
||||||
|
/admin/price-preferences:
|
||||||
|
$ref: paths/admin_price-preferences.yaml
|
||||||
|
/admin/price-preferences/{id}:
|
||||||
|
$ref: paths/admin_price-preferences_{id}.yaml
|
||||||
/admin/product-categories:
|
/admin/product-categories:
|
||||||
$ref: paths/admin_product-categories.yaml
|
$ref: paths/admin_product-categories.yaml
|
||||||
/admin/product-categories/{id}:
|
/admin/product-categories/{id}:
|
||||||
|
|||||||
@@ -0,0 +1,178 @@
|
|||||||
|
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 `-`.
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
- jwt_token: []
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/admin_price-preferences/get.sh
|
||||||
|
tags:
|
||||||
|
- Price Preferences
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
|
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.yaml
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/admin_price-preferences/post.sh
|
||||||
|
tags:
|
||||||
|
- Price Preferences
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
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:
|
||||||
|
$ref: ../code_samples/Shell/admin_price-preferences_{id}/get.sh
|
||||||
|
tags:
|
||||||
|
- Price Preferences
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
|
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.yaml
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/admin_price-preferences_{id}/post.sh
|
||||||
|
tags:
|
||||||
|
- Price Preferences
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
|
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
|
||||||
|
- 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:
|
||||||
|
$ref: ../code_samples/Shell/admin_price-preferences_{id}/delete.sh
|
||||||
|
tags:
|
||||||
|
- Price Preferences
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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.
|
||||||
@@ -4863,6 +4863,23 @@ components:
|
|||||||
rules:
|
rules:
|
||||||
type: object
|
type: object
|
||||||
description: The price's rules.
|
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:
|
AdminCreateProduct:
|
||||||
type: object
|
type: object
|
||||||
description: The create's details.
|
description: The create's details.
|
||||||
@@ -7127,6 +7144,23 @@ components:
|
|||||||
rules:
|
rules:
|
||||||
type: object
|
type: object
|
||||||
description: The price list's rules.
|
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:
|
AdminUpdateProduct:
|
||||||
type: object
|
type: object
|
||||||
description: The update's details.
|
description: The update's details.
|
||||||
|
|||||||
Reference in new issue
Block a user