You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DEVDOCS-6496 - Clarify date format for modifiers in documentation (#1080)
Updated documentation for date modifier to specify ISO-8601 ATOM format.
# [DEVDOCS-6496]
## What changed?
* When sending a PUT or POST request to create/update product modifier
options, the full ISO-8601 ATOM format is required.
* Currently, if the wrong format is provided, such as “2005-08-15”,
validation should fail, but it doesn’t.
## Release notes draft
* We've updated the validation workflow for creating product modifiers
to require ISO-8601 ATOM format, which includes date, time, and
timezone. Failing to provide dates in ISO-8601 ATOM format will now
result in a validation error.
## Anything else?
ping { @bigcommerce/dev-docs-team }
[DEVDOCS-6496]:
https://bigcommercecloud.atlassian.net/browse/DEVDOCS-6496?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
| `date` | `default_value` | Default ISO date string |
46
+
| `date` | `default_value` | Default ISO-8601 ATOM date string |
47
47
| | `date_limited` | Boolean: Indicates whether the allowed date options are limited |
48
48
| | `date_limit_mode` | Defines the type of limit on the date option. Accepts `earliest`, `range`, and `latest`. |
49
-
| | `date_earliest_value` | ISO date: the earliest date allowed to be entered on the date option |
50
-
| | `date_latest_value` | ISO date: the latest date allowed to be entered on the date option |
49
+
| | `date_earliest_value` | ISO-8601 ATOM date: the earliest date allowed to be entered on the date option |
50
+
| | `date_latest_value` | ISO-8601 ATOM date: the latest date allowed to be entered on the date option |
51
51
| `checkbox` | `checked_by_default` | Boolean: Indicates whether the option is checked by default |
52
52
| | `checkbox_label` | The label that appears next to the checkbox on the storefront |
53
53
| `file` | `file_types_mode` | Specifies whether you want to allow shoppers to upload any file type or if you only want to accept particular types defined in the `file_types_supported` array. |
@@ -207,6 +207,8 @@ paths:
207
207
208
208
**Notes**
209
209
It takes two separate requests to create a new checkbox modifier with option values. Perform a request to create a modifier, then perform a second request to update option values.
210
+
211
+
Date modifiers are required to be provided in [ISO-8601 ATOM](https://www.php.net/manual/en/class.datetimeinterface.php#datetimeinterface.constants.atom) format. Excluding them in a request will throw a server error.
210
212
operationId: createProductModifier
211
213
parameters:
212
214
- $ref: '#/components/parameters/ContentType'
@@ -415,7 +417,10 @@ paths:
415
417
tags:
416
418
- Product modifiers
417
419
summary: Update a product modifier
418
-
description: Updates a product modifier.
420
+
description: |-
421
+
Updates a product modifier.
422
+
423
+
Date modifiers are required to be provided in [ISO-8601 ATOM](https://www.php.net/manual/en/class.datetimeinterface.php#datetimeinterface.constants.atom) format. Excluding them in a request will throw a server error.
419
424
operationId: updateProductModifier
420
425
parameters:
421
426
- $ref: '#/components/parameters/ContentType'
@@ -460,7 +465,7 @@ paths:
460
465
default_value:
461
466
type: string
462
467
description: |
463
-
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. See [Configs](#configs) for more details.
468
+
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601 ATOM formatted string, or on a text option as a string. See [Configs](#configs) for more details.
464
469
checked_by_default:
465
470
type: boolean
466
471
description: |
@@ -485,12 +490,12 @@ paths:
485
490
date_earliest_value:
486
491
type: string
487
492
description: |
488
-
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
493
+
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
489
494
format: date
490
495
date_latest_value:
491
496
type: string
492
497
description: |
493
-
(date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
498
+
(date) The latest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
494
499
format: date
495
500
file_types_mode:
496
501
type: string
@@ -684,7 +689,7 @@ paths:
684
689
default_value:
685
690
type: string
686
691
description: |
687
-
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. See [Configs](#configs) for more details.
692
+
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601 ATOM formatted string, or on a text option as a string. See [Configs](#configs) for more details.
688
693
checked_by_default:
689
694
type: boolean
690
695
description: |
@@ -709,12 +714,12 @@ paths:
709
714
date_earliest_value:
710
715
type: string
711
716
description: |
712
-
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
717
+
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
713
718
format: date
714
719
date_latest_value:
715
720
type: string
716
721
description: |
717
-
(date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
722
+
(date) The latest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
718
723
format: date
719
724
file_types_mode:
720
725
type: string
@@ -2098,7 +2103,7 @@ components:
2098
2103
default_value:
2099
2104
type: string
2100
2105
description: |
2101
-
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. See [Configs](#configs) for more details.
2106
+
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601 ATOM formatted string, or on a text option as a string. See [Configs](#configs) for more details.
2102
2107
checked_by_default:
2103
2108
type: boolean
2104
2109
description: |
@@ -2123,12 +2128,12 @@ components:
2123
2128
date_earliest_value:
2124
2129
type: string
2125
2130
description: |
2126
-
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
2131
+
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
2127
2132
format: date
2128
2133
date_latest_value:
2129
2134
type: string
2130
2135
description: |
2131
-
(date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
2136
+
(date) The latest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
0 commit comments