Manage comapany users
A company user is a customer (buyer) that is assigned extended attributes that identify the company the user belongs to. Use the
POST /V1/customers call, which is included with Magento Magento Open Source and Magento Commerce, and specify the
company_attributes extended attributes to create a company user.
This topic discusses only the features of the
customerCustomerRepositoryV1 service that are specific to B2B. See Create a customer for an example of creating a standard customer.
Manage company users
This section describes the REST endpoints used to manage company users.
Company user parameters
The following table lists the parameters that can be used to create a company user.
||System-generated customer ID.||integer||Not applicable for create operations.|
||System-generated company ID.||integer||Required to create or update a company user.|
||A string that describes the company user’s responsibilities.||Required to create or update a company.|
||Indicates whether the company user is active or inactive||integer||
||Telephone number||string||Required to create a company user.|
Create a company user
POST /V1/customers call creates a Magento customer. B2B extends the
customerAccountManagementV1 service so that you can create a company user.
company_attributes code block to the payload that is required to create a standard customer.
Modify a company user
The following example changes the status of a company user to inactive.
If you change the
status to inactive, the account is locked. If the company user has child users, the system re-assigns the child users to the parent of the deactivated user.
Delete a company user
If the specified company user has child users, the system re-assigns the child users to the parent of the deleted user. The user account is deleted from Magento with all of its content, except quotes and orders. The user’s orders and quotes remain visible to the seller.
Magento locks the deleted user’s quotes and changes their status to Closed. The system does not allow to make changes on such quotes.
true, indicating the request was successful