From 147c16c6bb3761d4a1117221e4413eccc2aa6804 Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Tue, 4 Feb 2025 10:04:31 -0600 Subject: [PATCH 1/6] add Get all Bulk Pricing Rules --- reference/catalog/products_catalog.v3.yml | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/reference/catalog/products_catalog.v3.yml b/reference/catalog/products_catalog.v3.yml index 7f69a1d11..7b63dec59 100644 --- a/reference/catalog/products_catalog.v3.yml +++ b/reference/catalog/products_catalog.v3.yml @@ -3424,6 +3424,74 @@ paths: type: price amount: 1 meta: {} + get: + tags: + - Bulk pricing rules + summary: Get all Bulk Pricing Rules + description: Returns all *Bulk Pricing Rule*. Optional parameters can be passed in. + operationId: getAllBulkPricingRules + parameters: + - $ref: '#/components/parameters/IncludeFieldsParam' + - $ref: '#/components/parameters/ExcludeFieldsParam' + responses: + '200': + description: '' + content: + application/json: + schema: + title: 'Get All Bulk Pricing Rule Response' + type: object + properties: + data: + allOf: + - type: object + properties: + id: + type: integer + description: Unique ID of the *Bulk Pricing Rule*. Read-Only. + readOnly: true + required: + - id + - $ref: '#/components/schemas/bulkPricingRule_Full' + meta: + $ref: '#/components/schemas/metaCollection_Full' + example: + data: + id: 83 + quantity_min: 1 + quantity_max: 3 + type: price + amount: 1 + meta: + pagination: + total: 2 + count: 2 + per_page: 50 + current_page: 1 + total_pages: 1 + links: + current: '?page=1&limit=50' + '404': + description: | + The resource or parent resource was not found. + content: + application/json: + schema: + title: Not Found + type: object + properties: + status: + type: integer + description: | + 404 HTTP status code. + title: + type: string + description: The error title describing the particular error. + type: + type: string + instance: + type: string + description: Error payload for the BigCommerce API. '/catalog/products/{product_id}/bulk-pricing-rules/{bulk_pricing_rule_id}': get: tags: From ceca41bebe7f8ba98d97a85f9bfcd6a575866e9a Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Tue, 4 Feb 2025 10:24:42 -0600 Subject: [PATCH 2/6] Update reference/catalog/products_catalog.v3.yml Co-authored-by: Roman Liukshyn <79109064+bc-romanliukshyn@users.noreply.github.com> --- reference/catalog/products_catalog.v3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/catalog/products_catalog.v3.yml b/reference/catalog/products_catalog.v3.yml index 7b63dec59..6633f2f1b 100644 --- a/reference/catalog/products_catalog.v3.yml +++ b/reference/catalog/products_catalog.v3.yml @@ -3428,7 +3428,7 @@ paths: tags: - Bulk pricing rules summary: Get all Bulk Pricing Rules - description: Returns all *Bulk Pricing Rule*. Optional parameters can be passed in. + description: Returns all *Bulk Pricing Rules*. Optional parameters can be passed in. operationId: getAllBulkPricingRules parameters: - $ref: '#/components/parameters/IncludeFieldsParam' From 7ad66681f3cc522c684841422ee8124ffb931541 Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Thu, 6 Feb 2025 09:31:44 -0600 Subject: [PATCH 3/6] Update products_catalog.v3.yml per Roman --- reference/catalog/products_catalog.v3.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reference/catalog/products_catalog.v3.yml b/reference/catalog/products_catalog.v3.yml index 6633f2f1b..832de7754 100644 --- a/reference/catalog/products_catalog.v3.yml +++ b/reference/catalog/products_catalog.v3.yml @@ -3431,7 +3431,6 @@ paths: description: Returns all *Bulk Pricing Rules*. Optional parameters can be passed in. operationId: getAllBulkPricingRules parameters: - - $ref: '#/components/parameters/IncludeFieldsParam' - $ref: '#/components/parameters/ExcludeFieldsParam' responses: '200': @@ -3439,7 +3438,7 @@ paths: content: application/json: schema: - title: 'Get All Bulk Pricing Rule Response' + title: 'Get All Bulk Pricing Rules Response' type: object properties: data: From a91222712d85691f2d26e7e1a9b792277280c884 Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Thu, 6 Feb 2025 10:11:45 -0600 Subject: [PATCH 4/6] updates per Roman --- reference/catalog/products_catalog.v3.yml | 72 +++++++++++++---------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/reference/catalog/products_catalog.v3.yml b/reference/catalog/products_catalog.v3.yml index 832de7754..bd42bc70b 100644 --- a/reference/catalog/products_catalog.v3.yml +++ b/reference/catalog/products_catalog.v3.yml @@ -3411,9 +3411,7 @@ paths: type: integer description: Unique ID of the *Bulk Pricing Rule*. Read-Only. readOnly: true - required: - - id - - $ref: '#/components/schemas/bulkPricingRule_Full' + - $ref: '#/components/schemas/bulkPricingRule_Response' meta: $ref: '#/components/schemas/metaEmpty_Full' example: @@ -3449,9 +3447,7 @@ paths: type: integer description: Unique ID of the *Bulk Pricing Rule*. Read-Only. readOnly: true - required: - - id - - $ref: '#/components/schemas/bulkPricingRule_Full' + - $ref: '#/components/schemas/bulkPricingRule_Response' meta: $ref: '#/components/schemas/metaCollection_Full' example: @@ -3470,27 +3466,6 @@ paths: total_pages: 1 links: current: '?page=1&limit=50' - '404': - description: | - The resource or parent resource was not found. - content: - application/json: - schema: - title: Not Found - type: object - properties: - status: - type: integer - description: | - 404 HTTP status code. - title: - type: string - description: The error title describing the particular error. - type: - type: string - instance: - type: string - description: Error payload for the BigCommerce API. '/catalog/products/{product_id}/bulk-pricing-rules/{bulk_pricing_rule_id}': get: tags: @@ -3520,7 +3495,7 @@ paths: readOnly: true required: - id - - $ref: '#/components/schemas/bulkPricingRule_Full' + - $ref: '#/components/schemas/bulkPricingRule_Response' meta: $ref: '#/components/schemas/metaEmpty_Full' example: @@ -3599,9 +3574,7 @@ paths: type: integer description: Unique ID of the *Bulk Pricing Rule*. Read-Only. readOnly: true - required: - - id - - $ref: '#/components/schemas/bulkPricingRule_Full' + - $ref: '#/components/schemas/bulkPricingRule_Response' meta: $ref: '#/components/schemas/metaEmpty_Full' example: @@ -6123,6 +6096,43 @@ components: Optional field. This field automatically creates a dynamic 301 redirect when a product URL change occurs with a PUT request. Existing dynamic redirects will automatically update to a new URL to avoid a loop. description: The custom URL for the product on the storefront. If not provided in the POST request, the URL will be autogenerated from the product name. x-internal: false + bulkPricingRule_Response: + title: bulkPricingRule_Response + type: object + properties: + quantity_min: + minimum: 0 + type: integer + description: | + The minimum inclusive quantity of a product to satisfy this rule. Must be greater than or equal to zero. For `fixed` rules, the minimum quantity canʼt be less than two. + Required in /POST. + example: 10 + quantity_max: + minimum: 0 + type: integer + description: |- + The maximum inclusive quantity of a product to satisfy this rule. Must be greater than the `quantity_min` value – unless this field has a value of 0 (zero), in which case there will be no maximum bound for this rule. + Required in /POST. + example: 50 + type: + type: string + description: |- + The type of adjustment that is made. Values: `price` - the adjustment amount per product; `percent` - the adjustment as a percentage of the original price; `fixed` - the adjusted absolute price of the product. + Required in /POST. + example: price + enum: + - price + - percent + - fixed + amount: + oneOf: + - type: number + example: 10 + - type: string + example: '.10' + description: |- + You can express the adjustment type as either a fixed dollar amount or a percentage. Send a number; the response will return a number for `price` and `fixed` adjustments. + Divide the adjustment percentage by 100 and send the result in string format. For example, represent 10% as “.10”. The response will return a float value for both `price` and `percentage` adjustments. bulkPricingRule_Full: title: bulkPricingRule_Full type: object From 431609c2146487f6b9835c587600855ae7d9cb2a Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Thu, 6 Feb 2025 10:31:04 -0600 Subject: [PATCH 5/6] Update products_catalog.v3.yml -add include_fields query params --- reference/catalog/products_catalog.v3.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/reference/catalog/products_catalog.v3.yml b/reference/catalog/products_catalog.v3.yml index bd42bc70b..e50f1e4fb 100644 --- a/reference/catalog/products_catalog.v3.yml +++ b/reference/catalog/products_catalog.v3.yml @@ -3429,6 +3429,7 @@ paths: description: Returns all *Bulk Pricing Rules*. Optional parameters can be passed in. operationId: getAllBulkPricingRules parameters: + - $ref: '#/components/parameters/IncludeFieldsBulkPricingParam' - $ref: '#/components/parameters/ExcludeFieldsParam' responses: '200': @@ -9435,6 +9436,21 @@ components: - inventory_level - is_visible - total_sold + IncludeFieldsBulkPricingParam: + name: include_fields + in: query + description: Fields to include, in a comma-separated list. The ID and the specified fields will be returned. + style: form + explode: false + schema: + type: array + items: + type: string + enum: + - quantity_min + - quantity_max + - type + - amount IncludeFieldsParam: name: include_fields in: query From 82a45e20b1e34ecb724340888764db218898dd7d Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Thu, 6 Feb 2025 12:09:17 -0600 Subject: [PATCH 6/6] Update products_catalog.v3.yml- update include_fields param for Get a Bulk Pricing Rule endpoint --- reference/catalog/products_catalog.v3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/catalog/products_catalog.v3.yml b/reference/catalog/products_catalog.v3.yml index e50f1e4fb..506996462 100644 --- a/reference/catalog/products_catalog.v3.yml +++ b/reference/catalog/products_catalog.v3.yml @@ -3475,7 +3475,7 @@ paths: description: Returns a single *Bulk Pricing Rule*. Optional parameters can be passed in. operationId: getBulkPricingRule parameters: - - $ref: '#/components/parameters/IncludeFieldsParam' + - $ref: '#/components/parameters/IncludeFieldsBulkPricingParam' - $ref: '#/components/parameters/ExcludeFieldsParam' responses: '200':