diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences/get.sh new file mode 100644 index 0000000000..c2e4eb14ea --- /dev/null +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences/get.sh @@ -0,0 +1,2 @@ +curl '{backend_url}/admin/price-preferences' \ +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences/post.sh new file mode 100644 index 0000000000..afc3c6569d --- /dev/null +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences/post.sh @@ -0,0 +1,2 @@ +curl -X POST '{backend_url}/admin/price-preferences' \ +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/delete.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/delete.sh new file mode 100644 index 0000000000..ed3fcdb6a4 --- /dev/null +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/delete.sh @@ -0,0 +1,2 @@ +curl -X DELETE '{backend_url}/admin/price-preferences/{id}' \ +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/get.sh new file mode 100644 index 0000000000..d72766fb11 --- /dev/null +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/get.sh @@ -0,0 +1,2 @@ +curl '{backend_url}/admin/price-preferences/{id}' \ +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/post.sh new file mode 100644 index 0000000000..5d160b68b3 --- /dev/null +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_price-preferences_{id}/post.sh @@ -0,0 +1,2 @@ +curl -X POST '{backend_url}/admin/price-preferences/{id}' \ +-H 'x-medusa-access-token: {api_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePricePreference.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePricePreference.yaml new file mode 100644 index 0000000000..cc2c0dbe9d --- /dev/null +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePricePreference.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. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdatePricePreference.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUpdatePricePreference.yaml new file mode 100644 index 0000000000..0c5f879d8f --- /dev/null +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminUpdatePricePreference.yaml @@ -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. diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml index 771ab8b2e7..d35bdbc9dc 100644 --- a/www/apps/api-reference/specs/admin/openapi.full.yaml +++ b/www/apps/api-reference/specs/admin/openapi.full.yaml @@ -50,6 +50,7 @@ tags: - name: Orders - name: Payments - name: Price Lists + - name: Price Preferences - name: Product Categories x-associatedSchema: $ref: '#/components/schemas/AdminProductCategory' @@ -8861,6 +8862,431 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $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: get: operationId: GetProductCategories @@ -38551,6 +38977,23 @@ components: rules: type: object description: The price's rules. + AdminCreatePricePreference: + type: object + description: SUMMARY + x-schemaName: AdminCreatePricePreference + properties: + attribute: + type: string + title: attribute + description: The price preference's attribute. + value: + type: string + title: value + description: The price preference's value. + is_tax_inclusive: + type: boolean + title: is_tax_inclusive + description: The price preference's is tax inclusive. AdminCreateProduct: type: object description: The create's details. @@ -40815,6 +41258,23 @@ components: rules: type: object description: The price list's rules. + AdminUpdatePricePreference: + type: object + description: SUMMARY + x-schemaName: AdminUpdatePricePreference + properties: + attribute: + type: string + title: attribute + description: The price preference's attribute. + value: + type: string + title: value + description: The price preference's value. + is_tax_inclusive: + type: boolean + title: is_tax_inclusive + description: The price preference's is tax inclusive. AdminUpdateProduct: type: object description: The update's details. diff --git a/www/apps/api-reference/specs/admin/openapi.yaml b/www/apps/api-reference/specs/admin/openapi.yaml index 5a5506d3ea..9f7ce5f36e 100644 --- a/www/apps/api-reference/specs/admin/openapi.yaml +++ b/www/apps/api-reference/specs/admin/openapi.yaml @@ -56,6 +56,7 @@ tags: - name: Orders - name: Payments - name: Price Lists + - name: Price Preferences - name: Product Categories x-associatedSchema: $ref: ./components/schemas/AdminProductCategory.yaml @@ -211,6 +212,10 @@ paths: $ref: paths/admin_price-lists_{id}_prices_batch.yaml /admin/price-lists/{id}/products: $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: $ref: paths/admin_product-categories.yaml /admin/product-categories/{id}: diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-preferences.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-preferences.yaml new file mode 100644 index 0000000000..f525bfa919 --- /dev/null +++ b/www/apps/api-reference/specs/admin/paths/admin_price-preferences.yaml @@ -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 diff --git a/www/apps/api-reference/specs/admin/paths/admin_price-preferences_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_price-preferences_{id}.yaml new file mode 100644 index 0000000000..aeca2cc31d --- /dev/null +++ b/www/apps/api-reference/specs/admin/paths/admin_price-preferences_{id}.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 diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreatePricePreference.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreatePricePreference.yaml new file mode 100644 index 0000000000..cc2c0dbe9d --- /dev/null +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreatePricePreference.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. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminUpdatePricePreference.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminUpdatePricePreference.yaml new file mode 100644 index 0000000000..0c5f879d8f --- /dev/null +++ b/www/apps/api-reference/specs/store/components/schemas/AdminUpdatePricePreference.yaml @@ -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. diff --git a/www/apps/api-reference/specs/store/openapi.full.yaml b/www/apps/api-reference/specs/store/openapi.full.yaml index 6111932744..c628c50d94 100644 --- a/www/apps/api-reference/specs/store/openapi.full.yaml +++ b/www/apps/api-reference/specs/store/openapi.full.yaml @@ -4863,6 +4863,23 @@ components: rules: type: object description: The price's rules. + AdminCreatePricePreference: + type: object + description: SUMMARY + x-schemaName: AdminCreatePricePreference + properties: + attribute: + type: string + title: attribute + description: The price preference's attribute. + value: + type: string + title: value + description: The price preference's value. + is_tax_inclusive: + type: boolean + title: is_tax_inclusive + description: The price preference's is tax inclusive. AdminCreateProduct: type: object description: The create's details. @@ -7127,6 +7144,23 @@ components: rules: type: object description: The price list's rules. + AdminUpdatePricePreference: + type: object + description: SUMMARY + x-schemaName: AdminUpdatePricePreference + properties: + attribute: + type: string + title: attribute + description: The price preference's attribute. + value: + type: string + title: value + description: The price preference's value. + is_tax_inclusive: + type: boolean + title: is_tax_inclusive + description: The price preference's is tax inclusive. AdminUpdateProduct: type: object description: The update's details.