@spree/docs 0.1.181 → 0.1.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -90,7 +90,7 @@ This is deliberate. Answering `403` for another seller's product would confirm t
90
90
  | `record_not_found` | 404 | The record does not belong to the acting seller |
91
91
  | `validation_error` | 422 | Model validation failed; see `details` |
92
92
  | `processing_error` | 422 | A workflow refused — for example, submitting for review with requirements outstanding |
93
- | `parameter_missing` | 400 | A required parameter was absent |
93
+ | `parameter_missing` | 422 | A required parameter was absent — accepting an invitation without a password, for example |
94
94
  | `rate_limit_exceeded` | 429 | Too many requests to an auth endpoint |
95
95
 
96
96
  ## Handling errors with the SDK
@@ -876,8 +876,8 @@ paths:
876
876
  example:
877
877
  data:
878
878
  - id: prod_UkLWZg9DAJ
879
- name: Product 1576979
880
- slug: product-1576979
879
+ name: Product 1646979
880
+ slug: product-1646979
881
881
  meta_title:
882
882
  meta_description:
883
883
  meta_keywords:
@@ -1051,8 +1051,8 @@ paths:
1051
1051
  example:
1052
1052
  data:
1053
1053
  - id: prod_UkLWZg9DAJ
1054
- name: Product 2039085
1055
- slug: product-2039085
1054
+ name: Product 2109085
1055
+ slug: product-2109085
1056
1056
  meta_title:
1057
1057
  meta_description:
1058
1058
  meta_keywords:
@@ -1083,8 +1083,8 @@ paths:
1083
1083
  original_price:
1084
1084
  seller_id:
1085
1085
  - id: prod_gbHJdmfrXB
1086
- name: Product 2048209
1087
- slug: product-2048209
1086
+ name: Product 2118209
1087
+ slug: product-2118209
1088
1088
  meta_title:
1089
1089
  meta_description:
1090
1090
  meta_keywords:
@@ -1212,8 +1212,8 @@ paths:
1212
1212
  application/json:
1213
1213
  example:
1214
1214
  id: prod_UkLWZg9DAJ
1215
- name: Product 2316885
1216
- slug: product-2316885
1215
+ name: Product 2386885
1216
+ slug: product-2386885
1217
1217
  meta_title:
1218
1218
  meta_description:
1219
1219
  meta_keywords:
@@ -1564,8 +1564,8 @@ paths:
1564
1564
  preorder_ships_at:
1565
1565
  quantity: 1
1566
1566
  currency: USD
1567
- name: Product 131715
1568
- slug: product-131715
1567
+ name: Product 138715
1568
+ slug: product-138715
1569
1569
  options_text: ''
1570
1570
  price: '10.0'
1571
1571
  display_price: "$10.00"
@@ -1675,8 +1675,8 @@ paths:
1675
1675
  preorder_ships_at:
1676
1676
  quantity: 1
1677
1677
  currency: USD
1678
- name: Product 1322171
1679
- slug: product-1322171
1678
+ name: Product 1392171
1679
+ slug: product-1392171
1680
1680
  options_text: ''
1681
1681
  price: '10.0'
1682
1682
  display_price: "$10.00"
@@ -1972,7 +1972,7 @@ paths:
1972
1972
  total_quantity: 0
1973
1973
  warnings:
1974
1974
  - code: line_item_removed
1975
- message: Product 136307 was removed because it was sold out
1975
+ message: Product 143307 was removed because it was sold out
1976
1976
  line_item_id: li_UkLWZg9DAJ
1977
1977
  variant_id: variant_UkLWZg9DAJ
1978
1978
  coupon_code:
@@ -2182,8 +2182,8 @@ paths:
2182
2182
  preorder_ships_at:
2183
2183
  quantity: 1
2184
2184
  currency: USD
2185
- name: Product 1373263
2186
- slug: product-1373263
2185
+ name: Product 1443263
2186
+ slug: product-1443263
2187
2187
  options_text: ''
2188
2188
  price: '10.0'
2189
2189
  display_price: "$10.00"
@@ -2460,8 +2460,8 @@ paths:
2460
2460
  preorder_ships_at:
2461
2461
  quantity: 1
2462
2462
  currency: USD
2463
- name: Product 1398992
2464
- slug: product-1398992
2463
+ name: Product 1468992
2464
+ slug: product-1468992
2465
2465
  options_text: ''
2466
2466
  price: '10.0'
2467
2467
  display_price: "$10.00"
@@ -2492,7 +2492,7 @@ paths:
2492
2492
  first_name: John
2493
2493
  last_name: Doe
2494
2494
  full_name: John Doe
2495
- address1: 136 Lovely Street
2495
+ address1: 150 Lovely Street
2496
2496
  address2: Northwest
2497
2497
  postal_code: '10118'
2498
2498
  city: New York
@@ -2514,7 +2514,7 @@ paths:
2514
2514
  first_name: John
2515
2515
  last_name: Doe
2516
2516
  full_name: John Doe
2517
- address1: 135 Lovely Street
2517
+ address1: 149 Lovely Street
2518
2518
  address2: Northwest
2519
2519
  postal_code: '10118'
2520
2520
  city: New York
@@ -2668,8 +2668,8 @@ paths:
2668
2668
  preorder_ships_at:
2669
2669
  quantity: 1
2670
2670
  currency: USD
2671
- name: Product 1424794
2672
- slug: product-1424794
2671
+ name: Product 1494794
2672
+ slug: product-1494794
2673
2673
  options_text: ''
2674
2674
  price: '10.0'
2675
2675
  display_price: "$10.00"
@@ -2803,7 +2803,7 @@ paths:
2803
2803
  first_name: John
2804
2804
  last_name: Doe
2805
2805
  full_name: John Doe
2806
- address1: 142 Lovely Street
2806
+ address1: 156 Lovely Street
2807
2807
  address2: Northwest
2808
2808
  postal_code: '10118'
2809
2809
  city: New York
@@ -2825,7 +2825,7 @@ paths:
2825
2825
  first_name: John
2826
2826
  last_name: Doe
2827
2827
  full_name: John Doe
2828
- address1: 141 Lovely Street
2828
+ address1: 155 Lovely Street
2829
2829
  address2: Northwest
2830
2830
  postal_code: '10118'
2831
2831
  city: New York
@@ -3001,8 +3001,8 @@ paths:
3001
3001
  preorder_ships_at:
3002
3002
  quantity: 1
3003
3003
  currency: USD
3004
- name: Product 1694241
3005
- slug: product-1694241
3004
+ name: Product 1764241
3005
+ slug: product-1764241
3006
3006
  options_text: ''
3007
3007
  price: '10.0'
3008
3008
  display_price: "$10.00"
@@ -3192,8 +3192,8 @@ paths:
3192
3192
  preorder_ships_at:
3193
3193
  quantity: 1
3194
3194
  currency: USD
3195
- name: Product 1713461
3196
- slug: product-1713461
3195
+ name: Product 1783461
3196
+ slug: product-1783461
3197
3197
  options_text: ''
3198
3198
  price: '10.0'
3199
3199
  display_price: "$10.00"
@@ -3371,8 +3371,8 @@ paths:
3371
3371
  preorder_ships_at:
3372
3372
  quantity: 1
3373
3373
  currency: USD
3374
- name: Product 1738182
3375
- slug: product-1738182
3374
+ name: Product 1808182
3375
+ slug: product-1808182
3376
3376
  options_text: ''
3377
3377
  price: '10.0'
3378
3378
  display_price: "$10.00"
@@ -3482,7 +3482,7 @@ paths:
3482
3482
  first_name: John
3483
3483
  last_name: Doe
3484
3484
  full_name: John Doe
3485
- address1: 226 Lovely Street
3485
+ address1: 240 Lovely Street
3486
3486
  address2: Northwest
3487
3487
  postal_code: '10118'
3488
3488
  city: New York
@@ -3660,8 +3660,8 @@ paths:
3660
3660
  preorder_ships_at:
3661
3661
  quantity: 1
3662
3662
  currency: USD
3663
- name: Product 1755702
3664
- slug: product-1755702
3663
+ name: Product 1825702
3664
+ slug: product-1825702
3665
3665
  options_text: ''
3666
3666
  price: '10.0'
3667
3667
  display_price: "$10.00"
@@ -3906,8 +3906,8 @@ paths:
3906
3906
  preorder_ships_at:
3907
3907
  quantity: 1
3908
3908
  currency: USD
3909
- name: Product 1799569
3910
- slug: product-1799569
3909
+ name: Product 1869569
3910
+ slug: product-1869569
3911
3911
  options_text: ''
3912
3912
  price: '10.0'
3913
3913
  display_price: "$10.00"
@@ -4056,10 +4056,10 @@ paths:
4056
4056
  total_quantity: 2
4057
4057
  warnings:
4058
4058
  - code: delivery_unavailable
4059
- message: Product 18263 cannot be delivered to the selected address
4059
+ message: Product 18963 cannot be delivered to the selected address
4060
4060
  line_item_id: li_UkLWZg9DAJ
4061
4061
  - code: delivery_unavailable
4062
- message: Product 183298 cannot be delivered to the selected address
4062
+ message: Product 190298 cannot be delivered to the selected address
4063
4063
  line_item_id: li_gbHJdmfrXB
4064
4064
  coupon_code:
4065
4065
  item_total: '29.99'
@@ -4113,8 +4113,8 @@ paths:
4113
4113
  preorder_ships_at:
4114
4114
  quantity: 1
4115
4115
  currency: USD
4116
- name: Product 18263
4117
- slug: product-18263
4116
+ name: Product 18963
4117
+ slug: product-18963
4118
4118
  options_text: ''
4119
4119
  price: '10.0'
4120
4120
  display_price: "$10.00"
@@ -4144,8 +4144,8 @@ paths:
4144
4144
  preorder_ships_at:
4145
4145
  quantity: 1
4146
4146
  currency: USD
4147
- name: Product 183298
4148
- slug: product-183298
4147
+ name: Product 190298
4148
+ slug: product-190298
4149
4149
  options_text: ''
4150
4150
  price: '19.99'
4151
4151
  display_price: "$19.99"
@@ -4366,8 +4366,8 @@ paths:
4366
4366
  preorder_ships_at:
4367
4367
  quantity: 1
4368
4368
  currency: USD
4369
- name: Product 1899165
4370
- slug: product-1899165
4369
+ name: Product 1969165
4370
+ slug: product-1969165
4371
4371
  options_text: ''
4372
4372
  price: '10.0'
4373
4373
  display_price: "$10.00"
@@ -5180,8 +5180,8 @@ paths:
5180
5180
  preorder_ships_at:
5181
5181
  quantity: 1
5182
5182
  currency: USD
5183
- name: Product 2519789
5184
- slug: product-2519789
5183
+ name: Product 2589789
5184
+ slug: product-2589789
5185
5185
  options_text: ''
5186
5186
  price: '10.0'
5187
5187
  display_price: "$10.00"
@@ -5390,8 +5390,8 @@ paths:
5390
5390
  preorder_ships_at:
5391
5391
  quantity: 1
5392
5392
  currency: USD
5393
- name: Product 253179
5394
- slug: product-253179
5393
+ name: Product 260179
5394
+ slug: product-260179
5395
5395
  options_text: ''
5396
5396
  price: '10.0'
5397
5397
  display_price: "$10.00"
@@ -5557,8 +5557,8 @@ paths:
5557
5557
  preorder_ships_at:
5558
5558
  quantity: 1
5559
5559
  currency: USD
5560
- name: Product 193496
5561
- slug: product-193496
5560
+ name: Product 200496
5561
+ slug: product-200496
5562
5562
  options_text: ''
5563
5563
  price: '10.0'
5564
5564
  display_price: "$10.00"
@@ -5667,7 +5667,7 @@ paths:
5667
5667
  first_name: John
5668
5668
  last_name: Doe
5669
5669
  full_name: John Doe
5670
- address1: 282 Lovely Street
5670
+ address1: 296 Lovely Street
5671
5671
  address2: Northwest
5672
5672
  postal_code: '10118'
5673
5673
  city: New York
@@ -5689,7 +5689,7 @@ paths:
5689
5689
  first_name: John
5690
5690
  last_name: Doe
5691
5691
  full_name: John Doe
5692
- address1: 283 Lovely Street
5692
+ address1: 297 Lovely Street
5693
5693
  address2: Northwest
5694
5694
  postal_code: '10118'
5695
5695
  city: New York
@@ -5795,7 +5795,7 @@ paths:
5795
5795
  first_name: John
5796
5796
  last_name: Doe
5797
5797
  full_name: John Doe
5798
- address1: 100 Lovely Street
5798
+ address1: 114 Lovely Street
5799
5799
  address2: Northwest
5800
5800
  postal_code: '10118'
5801
5801
  city: New York
@@ -5816,7 +5816,7 @@ paths:
5816
5816
  first_name: John
5817
5817
  last_name: Doe
5818
5818
  full_name: John Doe
5819
- address1: 101 Lovely Street
5819
+ address1: 115 Lovely Street
5820
5820
  address2: Northwest
5821
5821
  postal_code: '10118'
5822
5822
  city: New York
@@ -5837,7 +5837,7 @@ paths:
5837
5837
  first_name: John
5838
5838
  last_name: Doe
5839
5839
  full_name: John Doe
5840
- address1: 102 Lovely Street
5840
+ address1: 116 Lovely Street
5841
5841
  address2: Northwest
5842
5842
  postal_code: '10118'
5843
5843
  city: New York
@@ -6095,7 +6095,7 @@ paths:
6095
6095
  first_name: John
6096
6096
  last_name: Doe
6097
6097
  full_name: John Doe
6098
- address1: 114 Lovely Street
6098
+ address1: 128 Lovely Street
6099
6099
  address2: Northwest
6100
6100
  postal_code: '10118'
6101
6101
  city: New York
@@ -6177,7 +6177,7 @@ paths:
6177
6177
  first_name: John
6178
6178
  last_name: Doe
6179
6179
  full_name: John Doe
6180
- address1: 120 Lovely Street
6180
+ address1: 134 Lovely Street
6181
6181
  address2: Northwest
6182
6182
  postal_code: '10118'
6183
6183
  city: Los Angeles
@@ -6667,8 +6667,8 @@ paths:
6667
6667
  preorder_ships_at:
6668
6668
  quantity: 1
6669
6669
  currency: USD
6670
- name: Product 1595270
6671
- slug: product-1595270
6670
+ name: Product 1665270
6671
+ slug: product-1665270
6672
6672
  options_text: ''
6673
6673
  price: '10.0'
6674
6674
  display_price: "$10.00"
@@ -6777,7 +6777,7 @@ paths:
6777
6777
  first_name: John
6778
6778
  last_name: Doe
6779
6779
  full_name: John Doe
6780
- address1: 186 Lovely Street
6780
+ address1: 200 Lovely Street
6781
6781
  address2: Northwest
6782
6782
  postal_code: '10118'
6783
6783
  city: New York
@@ -6799,7 +6799,7 @@ paths:
6799
6799
  first_name: John
6800
6800
  last_name: Doe
6801
6801
  full_name: John Doe
6802
- address1: 187 Lovely Street
6802
+ address1: 201 Lovely Street
6803
6803
  address2: Northwest
6804
6804
  postal_code: '10118'
6805
6805
  city: New York
@@ -6975,8 +6975,8 @@ paths:
6975
6975
  preorder_ships_at:
6976
6976
  quantity: 1
6977
6977
  currency: USD
6978
- name: Product 1615633
6979
- slug: product-1615633
6978
+ name: Product 1685633
6979
+ slug: product-1685633
6980
6980
  options_text: ''
6981
6981
  price: '10.0'
6982
6982
  display_price: "$10.00"
@@ -7085,7 +7085,7 @@ paths:
7085
7085
  first_name: John
7086
7086
  last_name: Doe
7087
7087
  full_name: John Doe
7088
- address1: 192 Lovely Street
7088
+ address1: 206 Lovely Street
7089
7089
  address2: Northwest
7090
7090
  postal_code: '10118'
7091
7091
  city: New York
@@ -7107,7 +7107,7 @@ paths:
7107
7107
  first_name: John
7108
7108
  last_name: Doe
7109
7109
  full_name: John Doe
7110
- address1: 193 Lovely Street
7110
+ address1: 207 Lovely Street
7111
7111
  address2: Northwest
7112
7112
  postal_code: '10118'
7113
7113
  city: New York
@@ -7326,7 +7326,7 @@ paths:
7326
7326
  first_name: John
7327
7327
  last_name: Doe
7328
7328
  full_name: John Doe
7329
- address1: 198 Lovely Street
7329
+ address1: 212 Lovely Street
7330
7330
  address2: Northwest
7331
7331
  postal_code: '10118'
7332
7332
  city: New York
@@ -7347,7 +7347,7 @@ paths:
7347
7347
  first_name: John
7348
7348
  last_name: Doe
7349
7349
  full_name: John Doe
7350
- address1: 199 Lovely Street
7350
+ address1: 213 Lovely Street
7351
7351
  address2: Northwest
7352
7352
  postal_code: '10118'
7353
7353
  city: New York
@@ -7369,7 +7369,7 @@ paths:
7369
7369
  first_name: John
7370
7370
  last_name: Doe
7371
7371
  full_name: John Doe
7372
- address1: 199 Lovely Street
7372
+ address1: 213 Lovely Street
7373
7373
  address2: Northwest
7374
7374
  postal_code: '10118'
7375
7375
  city: New York
@@ -7391,7 +7391,7 @@ paths:
7391
7391
  first_name: John
7392
7392
  last_name: Doe
7393
7393
  full_name: John Doe
7394
- address1: 198 Lovely Street
7394
+ address1: 212 Lovely Street
7395
7395
  address2: Northwest
7396
7396
  postal_code: '10118'
7397
7397
  city: New York
@@ -7482,7 +7482,7 @@ paths:
7482
7482
  first_name: John
7483
7483
  last_name: Doe
7484
7484
  full_name: John Doe
7485
- address1: 200 Lovely Street
7485
+ address1: 214 Lovely Street
7486
7486
  address2: Northwest
7487
7487
  postal_code: '10118'
7488
7488
  city: New York
@@ -7503,7 +7503,7 @@ paths:
7503
7503
  first_name: John
7504
7504
  last_name: Doe
7505
7505
  full_name: John Doe
7506
- address1: 201 Lovely Street
7506
+ address1: 215 Lovely Street
7507
7507
  address2: Northwest
7508
7508
  postal_code: '10118'
7509
7509
  city: New York
@@ -7525,7 +7525,7 @@ paths:
7525
7525
  first_name: John
7526
7526
  last_name: Doe
7527
7527
  full_name: John Doe
7528
- address1: 201 Lovely Street
7528
+ address1: 215 Lovely Street
7529
7529
  address2: Northwest
7530
7530
  postal_code: '10118'
7531
7531
  city: New York
@@ -7547,7 +7547,7 @@ paths:
7547
7547
  first_name: John
7548
7548
  last_name: Doe
7549
7549
  full_name: John Doe
7550
- address1: 200 Lovely Street
7550
+ address1: 214 Lovely Street
7551
7551
  address2: Northwest
7552
7552
  postal_code: '10118'
7553
7553
  city: New York
@@ -9343,7 +9343,7 @@ paths:
9343
9343
  variant:
9344
9344
  id: variant_gbHJdmfrXB
9345
9345
  product_id: prod_gbHJdmfrXB
9346
- sku: SKU-307
9346
+ sku: SKU-314
9347
9347
  options_text: ''
9348
9348
  track_inventory: true
9349
9349
  media_count: 0
@@ -10304,7 +10304,7 @@ paths:
10304
10304
  first_name:
10305
10305
  last_name:
10306
10306
  full_name: ''
10307
- address1: 159 Lovely Street
10307
+ address1: 173 Lovely Street
10308
10308
  address2: Northwest
10309
10309
  postal_code: '10118'
10310
10310
  city: New York
@@ -10375,7 +10375,7 @@ paths:
10375
10375
  first_name:
10376
10376
  last_name:
10377
10377
  full_name: ''
10378
- address1: 162 Lovely Street
10378
+ address1: 176 Lovely Street
10379
10379
  address2: Northwest
10380
10380
  postal_code: '10118'
10381
10381
  city: New York
@@ -10549,8 +10549,8 @@ paths:
10549
10549
  preorder_ships_at:
10550
10550
  quantity: 1
10551
10551
  currency: USD
10552
- name: Product 1585649
10553
- slug: product-1585649
10552
+ name: Product 1655649
10553
+ slug: product-1655649
10554
10554
  options_text: ''
10555
10555
  price: '10.0'
10556
10556
  display_price: "$10.00"
@@ -10659,7 +10659,7 @@ paths:
10659
10659
  first_name: John
10660
10660
  last_name: Doe
10661
10661
  full_name: John Doe
10662
- address1: 170 Lovely Street
10662
+ address1: 184 Lovely Street
10663
10663
  address2: Northwest
10664
10664
  postal_code: '10118'
10665
10665
  city: New York
@@ -10681,7 +10681,7 @@ paths:
10681
10681
  first_name: John
10682
10682
  last_name: Doe
10683
10683
  full_name: John Doe
10684
- address1: 171 Lovely Street
10684
+ address1: 185 Lovely Street
10685
10685
  address2: Northwest
10686
10686
  postal_code: '10118'
10687
10687
  city: New York
@@ -11262,19 +11262,6 @@ components:
11262
11262
  - actions
11263
11263
  - subjects
11264
11264
  - has_conditions
11265
- MeResponse:
11266
- type: object
11267
- description: Current admin user profile and serialized permissions
11268
- properties:
11269
- user:
11270
- "$ref": "#/components/schemas/AdminUser"
11271
- permissions:
11272
- type: array
11273
- items:
11274
- "$ref": "#/components/schemas/PermissionRule"
11275
- required:
11276
- - user
11277
- - permissions
11278
11265
  ImportSchemaField:
11279
11266
  type: object
11280
11267
  description: A canonical column of an import type, including per-store custom
@@ -64,7 +64,7 @@ erDiagram
64
64
  | `name` | Product name | Yes |
65
65
  | `description` | Full product description | Yes |
66
66
  | `slug` | URL-friendly identifier (e.g., `spree-tote`) | Yes |
67
- | `status` | `draft`, `active`, or `archived` | No |
67
+ | `status` | `draft`, `active`, or `archived`. A marketplace adds `proposed` and `rejected` — see Seller submissions below | No |
68
68
  | `available_on` | Date the product becomes available for sale | No |
69
69
  | `discontinue_on` | Date the product is no longer available | No |
70
70
  | `meta_title` | Custom SEO title | Yes |
@@ -221,6 +221,144 @@ spree api delete /products/prod_xxx
221
221
 
222
222
  > **TIP:** Operating on many products at once? The Admin API has bulk actions — `bulkStatusUpdate`, `bulkAddToCategories`, `bulkAddTags`, `bulkDestroy`, and more. See the [Admin API endpoint index](../../api-reference/admin-api/endpoints.md).
223
223
 
224
+ ## Seller submissions
225
+
226
+ On a marketplace, a seller lists a product but does not publish one. They submit it, and the marketplace decides. This adds two statuses to the three above — both hidden from the storefront, since only `active` is visible.
227
+
228
+ > **INFO:** This applies to products that belong to a seller. A marketplace's own catalog is unaffected: an operator publishing their own product sets `status` directly and answers to nobody.
229
+
230
+ ### The lifecycle
231
+
232
+ ```mermaid
233
+ stateDiagram-v2
234
+ [*] --> draft
235
+ draft --> proposed : seller submits
236
+ proposed --> active : operator approves
237
+ proposed --> rejected : operator sends back
238
+ rejected --> proposed : seller revises and resubmits
239
+ proposed --> draft : seller withdraws
240
+ proposed --> archived : seller withdraws
241
+ active --> draft : seller takes it down
242
+ active --> archived : seller withdraws it
243
+ ```
244
+
245
+ Withdrawing a submission before anyone has ruled on it closes the open row as `withdrawn`, so a `pending` row always means the marketplace still owes an answer. A product that was already rejected keeps that decision at the head of its trail instead.
246
+
247
+ | Status | Meaning | Storefront |
248
+ |---|---|:---:|
249
+ | `draft` | The seller is still working on it | Hidden |
250
+ | `proposed` | Submitted, waiting on the marketplace | Hidden |
251
+ | `rejected` | Sent back with a reason, awaiting changes | Hidden |
252
+ | `active` | Approved and on sale | **Visible** |
253
+ | `archived` | Withdrawn | Hidden |
254
+
255
+ A seller can always take their own listing down — that is not a review decision. Putting one up is.
256
+
257
+ ### The submission record
258
+
259
+ Each submission and each decision on it is a `Spree::ProductSubmission` row. The product's `status` stays the operational truth; these rows are how it got there.
260
+
261
+ ```mermaid
262
+ erDiagram
263
+ Product ||--o{ ProductSubmission : "has many"
264
+ AdminUser ||--o{ ProductSubmission : "submitted"
265
+ AdminUser ||--o{ ProductSubmission : "reviewed"
266
+
267
+ ProductSubmission {
268
+ string status
269
+ bigint product_id
270
+ bigint submitted_by_id
271
+ bigint reviewed_by_id
272
+ datetime reviewed_at
273
+ text review_note
274
+ json metadata
275
+ }
276
+ ```
277
+
278
+ | Column | Description |
279
+ |---|---|
280
+ | `status` | `pending`, `approved`, `rejected`, or `withdrawn` |
281
+ | `submitted_by_id` | The seller's staff member who asked |
282
+ | `reviewed_by_id` | The marketplace's staff member who decided |
283
+ | `reviewed_at` | When the decision was made |
284
+ | `review_note` | Why it was sent back — this is what the seller reads |
285
+
286
+ Rows accumulate rather than overwrite, so a seller sent back three times leaves three rows. The latest row for a product is the live one; the ones before it are the trail.
287
+
288
+ > **WARNING:** Never store a rejection reason on the product itself. A seller can write their own product's `metadata`, so a note kept there is erased the next time they save.
289
+
290
+ An approval with no `reviewed_by_id` and `metadata.auto_approved` set means the store approves listings automatically — never a decision whose author was lost. Turn that on with the `auto_approve_seller_products` store preference.
291
+
292
+ ### Submitting, as a seller
293
+
294
+ Status is not writable on the seller branch. A seller moves a product with an explicit action:
295
+
296
+
297
+ ```typescript Seller SDK
298
+ import { createSellerClient } from '@spree/seller-sdk'
299
+
300
+ const client = createSellerClient({
301
+ baseUrl: 'https://marketplace.example.com',
302
+ sellerId: 'sel_xxx',
303
+ })
304
+
305
+ await client.products.submit('prod_xxx') // draft or rejected → proposed
306
+ await client.products.draft('prod_xxx') // take it back down
307
+ await client.products.archive('prod_xxx') // withdraw it
308
+
309
+ // Why it was sent back
310
+ const product = await client.products.get('prod_xxx', 'submission')
311
+ product.submission?.review_note
312
+ ```
313
+
314
+ ```bash CLI
315
+ spree api patch /seller/products/prod_xxx/submit
316
+ spree api patch /seller/products/prod_xxx/draft
317
+ spree api patch /seller/products/prod_xxx/archive
318
+ ```
319
+
320
+
321
+ ### Deciding, as the marketplace
322
+
323
+
324
+ ```typescript Admin SDK
325
+ await client.products.approve('prod_xxx')
326
+ await client.products.reject('prod_xxx', { reason: 'Please add a photo showing scale.' })
327
+
328
+ // The review queue
329
+ const pending = await client.products.list({ filter: { status_eq: 'proposed' } })
330
+
331
+ // Who decided, and when
332
+ const product = await client.products.get('prod_xxx', { expand: ['submission'] })
333
+ product.submission?.reviewed_by_name
334
+ ```
335
+
336
+ ```bash CLI
337
+ spree api patch /products/prod_xxx/approve
338
+ spree api patch /products/prod_xxx/reject -d '{"reason": "Please add a photo showing scale."}'
339
+ ```
340
+
341
+
342
+ > **NOTE:** The seller sees the note and when the decision was made, but never who made it.
343
+
344
+ ### Leaving review is a decision
345
+
346
+ A product in `proposed` or `rejected` cannot have its status changed by an ordinary update — that would put it on sale with nobody's name against it. The refusal lives in the product update workflow, so every caller inherits it, and bulk status updates skip those products and report how many they left behind.
347
+
348
+ ### Events
349
+
350
+ Each transition publishes an event you can subscribe to:
351
+
352
+ | Event | Published when |
353
+ |---|---|
354
+ | `product.proposed` | A seller submits for review |
355
+ | `product.approved` | The marketplace accepts it |
356
+ | `product.rejected` | The marketplace sends it back |
357
+ | `product.drafted` | A seller takes a listing down |
358
+ | `product.archived` | A seller withdraws it |
359
+
360
+ The submission row itself also publishes `product_submission.created` and `product_submission.updated`, carrying the status, the note and the product. See [Events](events.md).
361
+
224
362
  ## Product Filters
225
363
 
226
364
  Get available filter options for building a faceted search UI. Returns price ranges, option values, and categories with counts:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.181",
3
+ "version": "0.1.182",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",