From 1aaabb435b354ca1a34b1da9640a5799ef5f2b2e Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Mon, 16 Oct 2023 12:20:21 -0500 Subject: [PATCH 1/3] (no ticket): [update] Email Templates, correct edited versions (#1501) --- .../combined/abandoned_cart_email.yml | 4 ++-- models/email_templates/combined/invoice_email.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/models/email_templates/combined/abandoned_cart_email.yml b/models/email_templates/combined/abandoned_cart_email.yml index ad8e3c064..d41dceda8 100644 --- a/models/email_templates/combined/abandoned_cart_email.yml +++ b/models/email_templates/combined/abandoned_cart_email.yml @@ -198,7 +198,7 @@ oneOf: type: string path: type: string - address: '123 Fake St, Dallas, TX 75225' + address: type: string phone_number: type: string @@ -280,7 +280,7 @@ oneOf: description: 'Path to the store (i.e., domain + protocol)' path: type: string - address: '123 Fake St, Dallas, TX 75225' + address: type: string language: type: object diff --git a/models/email_templates/combined/invoice_email.yml b/models/email_templates/combined/invoice_email.yml index 833c3b7c9..4c2113a9c 100644 --- a/models/email_templates/combined/invoice_email.yml +++ b/models/email_templates/combined/invoice_email.yml @@ -28,7 +28,7 @@ properties: items: type: object properties: - address: '123 Fake St, Dallas, TX 75225' + address: type: object properties: email: @@ -162,7 +162,7 @@ properties: properties: is_managed_by_amazon: type: boolean - address: '123 Fake St, Dallas, TX 75225' + address: type: object properties: email: @@ -359,7 +359,7 @@ properties: type: string shipping_method: type: string - shipping_to_address: '123 Fake St, Dallas, TX 75225' + shipping_to_address: type: string your_order_will_be_shipped_by: type: string @@ -371,7 +371,7 @@ properties: type: string price: type: string - email_address: '123 Fake St, Dallas, TX 75225' + email_address: type: string examples: order: @@ -384,7 +384,7 @@ examples: account_order_status_url: #url shipping: methods: - address: '123 Fake St, Dallas, TX 75225' + address: email: 'test@gmail.com' phone: +112233445566 first_name: John @@ -434,7 +434,7 @@ examples: value: 0 billing: is_managed_by_amazon: false - address: '123 Fake St, Dallas, TX 75225' + address: email: 'test@gmail.com' phone: +112233445566 first_name: John From 67f38addeb9e5aec6007c80651d3ef13a50eb35e Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Mon, 16 Oct 2023 21:28:26 -0500 Subject: [PATCH 2/3] (no ticket): [update] Email Templates, split Abandoned Cart oneOf into two schemas (#1503) --- .../combined/abandoned_cart_email.yml | 525 +++++------------- .../abandoned_cart_email_deprecated.yml | 119 ++++ 2 files changed, 249 insertions(+), 395 deletions(-) create mode 100644 models/email_templates/combined/abandoned_cart_email_deprecated.yml diff --git a/models/email_templates/combined/abandoned_cart_email.yml b/models/email_templates/combined/abandoned_cart_email.yml index d41dceda8..3c283fec8 100644 --- a/models/email_templates/combined/abandoned_cart_email.yml +++ b/models/email_templates/combined/abandoned_cart_email.yml @@ -1,265 +1,113 @@ title: Abandoned Cart Email Template description: Abandoned cart email triggers when a shopper doesnʼt complete an order. type: object -oneOf: - - properties: - notification: - type: array - items: - type: object - properties: - unsubscribe_link: - type: string - checkout_link: - type: string - coupon: - type: array - items: - type: object - properties: - code: - type: string - type: +properties: + notification: + type: array + items: + type: object + properties: + unsubscribe_link: + type: string + checkout_link: + type: string + coupon: + type: array + items: + type: object + properties: + code: + type: string + type: + type: array + items: + type: object + properties: + value: + type: string + formatted: + type: string + amount: + type: array + items: + type: object + properties: + value: + type: number + format: float + formatted: + type: string + cart: + type: array + items: + type: object + properties: + products: + type: array + items: + type: object + properties: type: array items: type: object properties: - value: + id: + type: number + url: type: string - formatted: + name: type: string - amount: - type: array - items: - type: object - properties: - value: - type: number - format: float - formatted: + quantity: + type: integer + sku: type: string - cart: - type: array - items: - type: object - properties: - products: - type: array - items: - type: object - properties: - '0': + thumbnail: + type: string + attributes: type: array items: type: object properties: - id: - type: number - url: - type: string - name: - type: string - quantity: - type: integer - sku: - type: string - thumbnail: - type: string - attributes: - type: array - items: - type: object - properties: - '0': - type: array - items: - type: object - properties: - name: - type: string - value: - type: string - '1': - type: array - items: - type: object - properties: - name: - type: string - value: - type: string - price: - type: array - items: - type: object - properties: - value: - type: number - format: float - formatted: - type: string - type: - type: array - items: - type: object - properties: - value: - type: integer - formatted: - type: string - '1': + type: array + items: + type: object + properties: + name: + type: string + value: + type: string + price: type: array items: type: object properties: - id: + value: type: number - url: - type: string - name: + format: float + formatted: type: string - quantity: + type: + type: array + items: + type: object + properties: + value: type: integer - sku: + formatted: type: string - thumbnail: - type: string - attributes: - type: array - items: - type: object - properties: - '0': - type: array - items: - type: object - properties: - name: - type: string - value: - type: string - '1': - type: array - items: - type: object - properties: - name: - type: string - value: - type: string - price: - type: array - items: - type: object - properties: - value: - type: number - format: float - formatted: - type: string - type: - type: array - items: - type: object - properties: - value: - type: integer - formatted: - type: string - store: - type: array - items: - type: object - properties: - name: - type: string - domain_name: - type: string - logo: - type: array - items: - type: object - properties: - title: - type: string - name: - type: string - url: - type: string - ssl_path: - type: string - cdn_path: - type: string - image_directory: - type: string - img_path: - type: string - path_normal: - type: string - path: - type: string - address: - type: string - phone_number: - type: string - language: - type: array - items: - type: object - properties: - code: - type: string - direction: - type: string - customer: - type: array - items: - type: object - properties: - first_name: - type: string - full_name: - type: string - email: - type: string - group: - type: array - items: - type: object - properties: - id: - type: number - name: - type: string - misc: - type: array - items: - type: object - properties: - year: - type: integer - - deprecated: true - properties: - abandoned_cart: - type: object - title: deprecated - deprecated: true - properties: - body: - type: string - unsubscribe_link: - type: string - store: - type: object - deprecated: true - properties: - name: - type: string - domain_name: - type: string - logo: + store: + type: array + items: + type: object + properties: + name: + type: string + domain_name: + type: string + logo: + type: array + items: type: object - deprecated: true properties: title: type: string @@ -267,168 +115,55 @@ oneOf: type: string url: type: string - ssl_path: - type: string - cdn_path: - type: string - image_directory: - type: string - img_path: - type: string - path_normal: - type: string - description: 'Path to the store (i.e., domain + protocol)' - path: - type: string - address: - type: string - language: + ssl_path: + type: string + cdn_path: + type: string + image_directory: + type: string + img_path: + type: string + path_normal: + type: string + path: + type: string + address: + type: string + phone_number: + type: string + language: + type: array + items: type: object properties: code: type: string direction: type: string - description: 'Left to right or right to left, depending on the language' - customer: - type: object - deprecated: true - properties: - first_name: - type: string - full_name: - type: string - email: - type: string - group: - type: array - items: - type: object - properties: - name: - type: string - misc: - type: object - deprecated: true - properties: - year: - type: integer - translations: - type: object - deprecated: true - properties: - en: + customer: + type: array + items: + type: object + properties: + first_name: + type: string + full_name: + type: string + email: + type: string + group: + type: array + items: type: object properties: - unsubscribe: + id: + type: number + name: type: string - - properties: - notification: - - unsubscribe_link: string - checkout_link: string - coupon: - - code: string - type: - - value: string - formatted: string - amount: - - value: 0 - formatted: string - cart: - - products: - - '0': - - id: 0 - url: string - name: string - quantity: 0 - sku: string - thumbnail: string - attributes: - - '0': - - name: string - value: string - '1': - - name: string - value: string - price: - - value: 0 - formatted: string - type: - - value: 0 - formatted: string - - '1': - - id: 0 - url: string - name: string - quantity: 0 - sku: string - thumbnail: string - attributes: - - '0': - - name: string - value: string - '1': - - name: string - value: string - price: - - value: 0 - formatted: string - type: - - value: 0 - formatted: string - store: - - name: string - domain_name: string - logo: - - title: string - name: string - url: string - ssl_path: string - cdn_path: string - image_directory: string - img_path: string - path_normal: string - path: string - address: string - phone_number: string - language: - - code: string - direction: string - customer: - - first_name: string - full_name: string - email: string - group: - - id: 0 - name: string - misc: - - year: 0 -example: - abandoned_cart: - body: You recently visited our online store and we noticed that you didnʼt complete your order.\n
To complete your order right now, just click on the link below:\n Complete your order - unsubscribe_link: 'example.com/unsubscribe' - store: - name: My Dev Store 97434969 - domain_name: my-dev-store-97434969.store.bcdev - logo: - title: [= My Dev Store 97434969 =] - name: avatar-2020_1612860757__16350.jpeg - url: 'https://valeryderived-cloud-dev-vm.store.bcdev/store/f1kr2akw96/product_images/avatar-2020_1612860757__16350.jpeg' - ssl_path: 'https://my-dev-store-97434969.store.bcdev' - cdn_path: 'https://valeryderived-cloud-dev-vm.store.bcdev/store/f1kr2akw96' - image_directory: product_images - img_path: 'https://valeryderived-cloud-dev-vm.store.bcdev/r08d84bb67d250c7624502ed76d8e0bafb1a5cacf/g-themes/ClassicNext/images' - path_normal: 'https://my-dev-store-97434969.store.bcdev' - path: 'https://my-dev-store-97434969.store.bcdev' - address: '123 Fake St, Dallas, TX 75225' - language: - code: en - direction: ltr - customer: - first_name: John - full_name: John Jr - email: 'john.f@example.com' - misc: - year: 2021 - translations: - en: unsubscribe:'Unsubscribe from future emails like this. + misc: + type: array + items: + type: object + properties: + year: + type: integer diff --git a/models/email_templates/combined/abandoned_cart_email_deprecated.yml b/models/email_templates/combined/abandoned_cart_email_deprecated.yml new file mode 100644 index 000000000..1cd67fbd6 --- /dev/null +++ b/models/email_templates/combined/abandoned_cart_email_deprecated.yml @@ -0,0 +1,119 @@ +title: Abandoned Cart Email Template (Deprecated) +description: Abandoned cart email triggers when a shopper doesnʼt complete an order. +type: object +deprecated: true +properties: + abandoned_cart: + type: object + title: deprecated + deprecated: true + properties: + body: + type: string + unsubscribe_link: + type: string + store: + type: object + deprecated: true + properties: + name: + type: string + domain_name: + type: string + logo: + type: object + deprecated: true + properties: + title: + type: string + name: + type: string + url: + type: string + ssl_path: + type: string + cdn_path: + type: string + image_directory: + type: string + img_path: + type: string + path_normal: + type: string + description: 'Path to the store (i.e., domain + protocol)' + path: + type: string + address: + type: string + language: + type: object + properties: + code: + type: string + direction: + type: string + description: 'Left to right or right to left, depending on the language' + customer: + type: object + deprecated: true + properties: + first_name: + type: string + full_name: + type: string + email: + type: string + group: + type: array + items: + type: object + properties: + name: + type: string + misc: + type: object + deprecated: true + properties: + year: + type: integer + translations: + type: object + deprecated: true + properties: + en: + type: object + properties: + unsubscribe: + type: string +examples: + Abandoned Cart example (deprecated): + value: + abandoned_cart: + body: You recently visited our online store and we noticed that you didnʼt complete your order.\n
To complete your order right now, just click on the link below:\n Complete your order + unsubscribe_link: 'example.com/unsubscribe' + store: + name: My Dev Store 97434969 + domain_name: my-dev-store-97434969.store.bcdev + logo: + title: [= My Dev Store 97434969 =] + name: avatar-2020_1612860757__16350.jpeg + url: 'https://valeryderived-cloud-dev-vm.store.bcdev/store/f1kr2akw96/product_images/avatar-2020_1612860757__16350.jpeg' + ssl_path: 'https://my-dev-store-97434969.store.bcdev' + cdn_path: 'https://valeryderived-cloud-dev-vm.store.bcdev/store/f1kr2akw96' + image_directory: product_images + img_path: 'https://valeryderived-cloud-dev-vm.store.bcdev/r08d84bb67d250c7624502ed76d8e0bafb1a5cacf/g-themes/ClassicNext/images' + path_normal: 'https://my-dev-store-97434969.store.bcdev' + path: 'https://my-dev-store-97434969.store.bcdev' + address: '123 Fake St, Dallas, TX 75225' + language: + code: en + direction: ltr + customer: + first_name: John + full_name: John Jr + email: 'john.f@example.com' + misc: + year: 2021 + translations: + en: + unsubscribe: 'Unsubscribe from future emails like this.' From 350c345fa0562e81899b2faec968d9d7b049f6fa Mon Sep 17 00:00:00 2001 From: bc-andreadao <96258747+bc-andreadao@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:17:08 -0500 Subject: [PATCH 3/3] DEVDOCS-5484 [new]: Settings API, add units of measurement endpoints (#1491) --- reference/settings.v3.yml | 95 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/reference/settings.v3.yml b/reference/settings.v3.yml index a84392f90..ab4a8eb4f 100644 --- a/reference/settings.v3.yml +++ b/reference/settings.v3.yml @@ -37,6 +37,7 @@ tags: - name: Favicon Image - name: Store Profile - name: Storefront Product + - name: Units of Measurement paths: '/settings/analytics': parameters: @@ -1434,6 +1435,66 @@ paths: tags: - Inventory description: Update inventory settings + /settings/store/units-of-measurement: + get: + summary: Get Units of Measurement Settings + description: |- + Get settings for [units of measurements](https://support.bigcommerce.com/s/article/Store-Settings?language=en_US#physical). + tags: + - Units of Measurement + responses: + '200': + description: 'OK. When you request channel-level settings, `null` indicates that a channel does not have overrides.' + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/MeasurementUnitsSettings' + meta: + type: object + '422': + description: The provided settings could not be applied. See detailed errors in the response. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + parameters: + - $ref: '#/components/parameters/ChannelIdParam' + put: + summary: Update Units of Measurement Settings + description: |- + Update settings for [units of measurements](https://support.bigcommerce.com/s/article/Store-Settings?language=en_US#physical). + + The endpoint does not support partial updates. Provide all fields to update global or channel-level settings. + + Create channel-level settings, or overrides for a channel, using the `channel_id` query parameter. + + To delete overrides for a channel, supply `null` as a value for all fields. A channel then inherits global values. + + The endpoint does not support 'null' as a value for global-level settings. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MeasurementUnitsSettings' + responses: + '200': + description: 'OK. When you request channel-level settings, `null` indicates that a channel does not have overrides.' + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/MeasurementUnitsSettings' + meta: + type: object + parameters: + - $ref: '#/components/parameters/ChannelIdParam' + tags: + - Units of Measurement components: parameters: Accept: @@ -2302,6 +2363,40 @@ components: type: string title: '' x-internal: false + MeasurementUnitsSettings: + type: object + properties: + weight_measurement: + type: string + example: Ounces + enum: + - LBS + - Ounces + - KGS + - Grams + - Tonnes + length_measurement: + type: string + example: Inches + enum: + - Inches + - Centimeters + decimal_token: + type: string + example: '.' + thousands_token: + type: string + example: ',' + decimal_places: + type: integer + example: 2 + factoring_dimension: + type: string + example: depth + enum: + - depth + - height + - width responses: 200-storefront-product-settings: description: OK. `null` indicates that a particular field has not been overridden on a channel level when channel level settings are requested