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
Copy file name to clipboardExpand all lines: docs/b2b-edition/specs/storefront/storefront/company.yaml
+31-29Lines changed: 31 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ info:
18
18
19
19
A Company user is a buyer with a [BigCommerce customer account](https://developer.bigcommerce.com/docs/rest-management/customers-v2#get-all-customers) associated with a B2B Edition Company account. The Users Storefront API allows you to perform common user management tasks as a B2B buyer, such as viewing and updating user information, adding users to a Company account, and deleting them.
20
20
21
-
**NOTE:** When performing storefront user management tasks as a Company user, you must confirm that the user’s Company role has the necessary permissions for the task. See [Company Roles and Permissions](https://developer.bigcommerce.com/b2b-edition/apis/rest-management/company#company-roles-and-permissions) for a complete list of permissions and their scopes.
21
+
> **NOTE:** When performing storefront user management tasks as a Company user, you must confirm that the user’s Company role has the necessary permissions for the task. See [Company Roles and Permissions](https://developer.bigcommerce.com/b2b-edition/apis/rest-management/company#company-roles-and-permissions) for a complete list of permissions and their scopes.
22
22
23
23
### Company Users and Customer Accounts
24
24
@@ -29,12 +29,12 @@ info:
29
29
| BigCommerce customer account | B2B Edition Company user account |
30
30
| --- | --- |
31
31
| **Defines:** | **Defines:** |
32
-
| - Store credit | - Storefront channel access |
33
-
| - Abandoned cart saver and product review email consent | - Basic user information like name and email address |
34
-
| - Account password and password reset | - Assigned buyer role |
35
-
| - Tax exempt code | - Company user extra fields |
36
-
| - Account signup form fields | |
37
-
| - Data collection consent | |
32
+
| Store credit | Storefront channel access |
33
+
| Abandoned cart saver and product review email consent | Basic user information like name and email address |
34
+
| Account password and password reset | Assigned buyer role |
35
+
| Tax exempt code | Company user extra fields |
36
+
| Account signup form fields | |
37
+
| Data collection consent | |
38
38
39
39
### Specifying User Role
40
40
The role field uses numeric values to assign a role to a Company user account. B2B Edition’s predefined Company roles correspond the following values:
@@ -56,7 +56,7 @@ security:
56
56
tags:
57
57
- name: Companies
58
58
- name: Addresses
59
-
- name: User
59
+
- name: Users
60
60
61
61
paths:
62
62
/frontend/companies:
@@ -71,6 +71,8 @@ paths:
71
71
72
72
Equivalent Storefront GraphQL API Mutation: `companyCreate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
73
73
74
+
> The `registerCompany` mutation in the BigCommerce Storefront GraphQL API also allows you to create a new Company account as a storefront customer. See [Company Account Registration](/docs/storefront/graphql/b2b/company-account-registration) to learn more.
75
+
74
76
If you have configured required information fields in your store’s Extra Fields settings for Company accounts or Company users, you must include the field’s name and value in the `extraFields` array of the request body. For more information on extra fields, see [B2B Edition Settings](https://support.bigcommerce.com/s/article/B2B-Edition-Settings) in the Help Center.
75
77
parameters: []
76
78
requestBody:
@@ -172,7 +174,7 @@ paths:
172
174
get:
173
175
tags:
174
176
- Companies
175
-
- User
177
+
- Users
176
178
summary: "Get a Company by User ID"
177
179
operationId: getcompanybyuserid
178
180
description: |-
@@ -231,7 +233,7 @@ paths:
231
233
get:
232
234
tags:
233
235
- Companies
234
-
- User
236
+
- Users
235
237
summary: "Get a Company User List"
236
238
operationId: get-companies-companyId-users
237
239
description: |-
@@ -466,7 +468,7 @@ paths:
466
468
properties:
467
469
addresses:
468
470
type: object
469
-
description: "Addresses are returned as member objects within this object using the addressId as the member key."
471
+
description: "Addresses are returned as member objects within this object using the `addressId` as the member key."
Returns all addresses associated with a Company account that match the query string `q`
615
+
Returns all addresses associated with a Company account that match the query string `q`.
614
616
615
617
Equivalent Storefront GraphQL API Query: `addresses`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
616
618
parameters:
@@ -742,7 +744,7 @@ paths:
742
744
label: "Austin Warehouse"
743
745
firstName: "Marie"
744
746
LastName: "Curie"
745
-
addressLine1: "11305 Four Points Drive"
747
+
addressLine1: "512 Bluebonnet Lane"
746
748
addressLine2: "Building 2"
747
749
city: "Austin"
748
750
state:
@@ -779,7 +781,7 @@ paths:
779
781
description: |-
780
782
Returns a specific address based on the `companyId` and `addressId` in the path.
781
783
782
-
Equivalent Storefront GraphQL API Query: address. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
784
+
Equivalent Storefront GraphQL API Query: `address`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
Returns a Company’s default shipping and billing addresses. Use Update Address Information to change which addresses are set as the defaults.
970
+
Returns a Company’s default shipping and billing addresses. Use [Update Address Information](#update-address-information) to change which addresses are set as the defaults.
969
971
970
972
Equivalent Storefront GraphQL API Query: `defaultBillingAddress` for the billing address and `defaultShippingAddress` for the shipping address. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
971
973
parameters: []
@@ -1005,7 +1007,7 @@ paths:
1005
1007
firstName: "Marie"
1006
1008
lastName: "Curie"
1007
1009
phoneNumber: "8001234567"
1008
-
addressLine1: "11305 Four Points Drive"
1010
+
addressLine1: "512 Bluebonnet Lane"
1009
1011
addressLine2: "Building 2"
1010
1012
city: "Austin"
1011
1013
state:
@@ -1024,7 +1026,7 @@ paths:
1024
1026
firstName: "Marie"
1025
1027
lastName: "Curie"
1026
1028
phoneNumber: "8001234567"
1027
-
addressLine1: "11305 Four Points Drive"
1029
+
addressLine1: "512 Bluebonnet Lane"
1028
1030
addressLine2: "Building 2"
1029
1031
city: "Austin"
1030
1032
state:
@@ -1041,7 +1043,7 @@ paths:
1041
1043
parameters: []
1042
1044
get:
1043
1045
tags:
1044
-
- User
1046
+
- Users
1045
1047
summary: "Check Existence of a Customer Email"
1046
1048
operationId: get-users-validations-existence
1047
1049
description: "This endpoint previously validated extra fields for a particular Company user by email address."
@@ -1071,7 +1073,7 @@ paths:
1071
1073
parameters: []
1072
1074
get:
1073
1075
tags:
1074
-
- User
1076
+
- Users
1075
1077
summary: "Get User List"
1076
1078
operationId: get-users
1077
1079
description: |-
@@ -1109,7 +1111,7 @@ paths:
1109
1111
$ref: "#/components/schemas/responsePagination"
1110
1112
post:
1111
1113
tags:
1112
-
- User
1114
+
- Users
1113
1115
summary: "Create a User"
1114
1116
operationId: post-users
1115
1117
description: |-
@@ -1180,7 +1182,7 @@ paths:
1180
1182
- $ref: "#/components/parameters/userId"
1181
1183
get:
1182
1184
tags:
1183
-
- User
1185
+
- Users
1184
1186
summary: "Get User Information"
1185
1187
operationId: get-users-userId
1186
1188
description: |-
@@ -1223,7 +1225,7 @@ paths:
1223
1225
$ref: "#/components/schemas/userEmail"
1224
1226
put:
1225
1227
tags:
1226
-
- User
1228
+
- Users
1227
1229
summary: "Update User Information"
1228
1230
operationId: put-users-userId
1229
1231
description: |-
@@ -1254,7 +1256,7 @@ paths:
1254
1256
$ref: "#/components/responses/genericResponse"
1255
1257
delete:
1256
1258
tags:
1257
-
- User
1259
+
- Users
1258
1260
summary: "Delete a User"
1259
1261
operationId: delete-users-userId
1260
1262
description: |-
@@ -1274,7 +1276,7 @@ components:
1274
1276
addressLine1:
1275
1277
type: string
1276
1278
description: "The first line of the address"
1277
-
example: "11305 Four Points Drive"
1279
+
example: "512 Bluebonnet Lane"
1278
1280
addressLine2:
1279
1281
type: string
1280
1282
description: "The second line of the address"
@@ -1388,7 +1390,7 @@ components:
1388
1390
companyAddress:
1389
1391
type: string
1390
1392
description: "The local address information for the address."
0 commit comments