Skip to content

Commit 78b3643

Browse files
feat(b2b):B2B-4545 Update v2/frontend/companies to include mandatory customerEmail field (#1291)
<!-- Ticket number or summary of work --> # [B2B-4545] ## What changed? * Update POST v2/frontend/companies request schema to include new required field `customerEmail` * Add validation error example for missing field ## Release notes draft - Add new required field `customerEmail` to POST v2/frontend/companies ping @bc-Vince @bc-sylvialin @chris-nowicki [B2B-4545]: https://bigcommercecloud.atlassian.net/browse/B2B-4545?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent fb2a4e6 commit 78b3643

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

docs/b2b-edition/specs/storefront/storefront.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,11 @@ paths:
12011201
example: 17316289569
12021202
format: int64
12031203
type: integer
1204+
customerEmail:
1205+
type: string
1206+
format: email
1207+
description: "The email address of the BigCommerce customer account for the Company account administrator. Must match the email on the customer account identified by `customerId`."
1208+
example: admin@example.com
12041209
customerId:
12051210
type: string
12061211
extraFields:
@@ -1223,6 +1228,7 @@ paths:
12231228
- companyName
12241229
- companyPhoneNumber
12251230
- companyEmail
1231+
- customerEmail
12261232
- addressLine1
12271233
- addressLine2
12281234
- city

docs/b2b-edition/specs/storefront/storefront/company.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ paths:
9999
- companyLastName
100100
- companyName
101101
- companyPhoneNumber
102+
- customerEmail
102103
- customerId
103104
- state
104105
- storeHash
@@ -122,6 +123,8 @@ paths:
122123
customerId:
123124
type: string
124125
description: "The ID of the BigCommerce customer account for the Company account administrator."
126+
customerEmail:
127+
$ref: "#/components/schemas/customerEmail"
125128
storeHash:
126129
type: string
127130
description: "The unique store hash for the BigCommerce store."
@@ -147,6 +150,39 @@ paths:
147150
properties:
148151
companyId:
149152
$ref: "#/components/schemas/companyId_INT"
153+
"400":
154+
description: Bad Request
155+
content:
156+
application/json:
157+
schema:
158+
type: object
159+
properties:
160+
code:
161+
type: number
162+
description: "The application-level error code for the response."
163+
data:
164+
type: object
165+
properties: {}
166+
description: "Response data."
167+
message:
168+
type: string
169+
description: "A message describing the error."
170+
examples:
171+
Missing Customer Email:
172+
value:
173+
code: 10013
174+
data: {}
175+
message: "customer email is required"
176+
Customer Does Not Exist:
177+
value:
178+
code: 10012
179+
data: {}
180+
message: "customer does not exist"
181+
Missing Required Fields:
182+
value:
183+
code: 10013
184+
data: {}
185+
message: "PARAMETER VALUE NOT ALLOW NULL"
150186
/companies/extra-fields/storefront:
151187
parameters: []
152188
get:
@@ -1501,6 +1537,11 @@ components:
15011537
companyEmail:
15021538
description: "The primary email address of the company."
15031539
example: "admin@example.com"
1540+
customerEmail:
1541+
type: string
1542+
format: email
1543+
description: "The email address of the BigCommerce customer account for the Company account administrator. Must match the email on the customer account identified by `customerId`."
1544+
example: "admin@example.com"
15041545
catalogId:
15051546
type: string
15061547
description: "The ID of the price list assigned to the Company account."

0 commit comments

Comments
 (0)