Skip to main content
Anchor to BusinessCustomerUserError

BusinessCustomerUserError

object

Requires read_customers access scope or read_companies access scope.

An error that happens during the execution of a business customer mutation.

•BusinessCustomerErrorCode

The error code.

•[String!]

The path to the input field that caused the error.

•String!
non-null

The error message.


Was this section helpful?

•mutation

Deletes a list of companies.

Arguments

•[ID!]!
required

A list of IDs of companies to delete.


•mutation

Deletes a company address.

Arguments

•ID!
required

The ID of the address to delete.


•mutation

Adds an existing Customer as a contact to a Company. Companies are business entities that make purchases from the merchant's store. Use this mutation when you have a customer who needs to be associated with a B2B company to make purchases on behalf of that company.

The mutation returns the newly created CompanyContact that links the customer to the company. After assignment, the customer becomes a company contact who can place orders on behalf of the company with access to any catalogs, pricing, and payment terms configured for the company's locations.

Arguments

•ID!
required

The ID of the company to assign the contact to.

•ID!
required

The ID of the customer to assign as the contact.


•mutation

Assigns the main contact for the company.

Arguments

•ID!
required

The ID of the company to assign the main contact to.

•ID!
required

The ID of the company contact to be assigned as the main contact.


•mutation

Assigns a role to a contact for a location.

Arguments

•ID!
required

The ID of the contact to assign a role to.

Anchor to companyContactRoleIdcompanyContactRoleId
•ID!
required

The ID of the role to assign to a contact.

•ID!
required

The ID of the location to assign a role to a contact.


•mutation

Assigns roles on a company contact.

Arguments

•ID!
required

The contact whose roles are being assigned.

•[CompanyContactRoleAssign!]!
required

The new roles to assign.


•mutation

Creates a company contact and the associated customer.

Arguments

•ID!
required

The ID of the company that the company contact belongs to.

•CompanyContactInput!
required

The fields to use to create the company contact.


•mutation

Deletes a company contact.

Arguments

•ID!
required

The ID of the company contact to delete.


•mutation

Removes a company contact from a Company.

Arguments

•ID!
required

The ID of the company contact to remove from the Company.


•mutation

Revokes a role on a company contact.

Arguments

•ID!
required

The ID of the contact to revoke a role from.

Anchor to companyContactRoleAssignmentIdcompanyContactRoleAssignmentId
•ID!
required

The ID of the role assignment to revoke from a contact.


•mutation

Revokes roles on a company contact.

Arguments

•ID!
required

The contact whose roles are being revoked.

•[ID!]

The current role assignment IDs to revoke.

•Boolean
Default:false

Flag to revoke all roles on the contact.


•mutation

Deletes one or more company contacts.

Arguments

•[ID!]!
required

The list of IDs of the company contacts to delete.


•mutation

Updates a company contact.

Arguments

•ID!
required

The ID of the company contact to be updated.

•CompanyContactInput!
required

The fields to use to update the company contact.


•mutation

Creates a Company for B2B commerce. This mutation creates the company and can optionally create an initial CompanyContact and CompanyLocation in a single operation. Company contacts are people who place orders on behalf of the company. Company locations are branches or offices with their own billing and shipping addresses.


Note

Creating a company without a name returns an error.


Learn more about creating companies for B2B.

Arguments

•CompanyCreateInput!
required

The fields to use when creating the company.


•mutation

Deletes a company.

Arguments

•ID!
required

The ID of the company to delete.


•mutation

Updates an address on a company location.

Arguments

•ID!
required

The ID of the company location to update addresses on.

•CompanyAddressInput!
required

The input fields to use to update the address.

•[CompanyAddressType!]!
required

The list of address types on the location to update.


•mutation

Assigns roles on a company location.

Arguments

•ID!
required

The location whose roles are being assigned.

•[CompanyLocationRoleAssign!]!
required

The roles to assign.


•mutation

Creates one or more mappings between a staff member at a shop and a company location.

Arguments

•ID!
required

The ID of the company location to assign the staff member to.

•[ID!]!
required

The list of IDs of the staff members to assign.


•mutation

Creates a new location for a Company. Company locations are branches or offices where B2B customers can place orders with specific pricing, catalogs, and payment terms.

Creates a company location. Each location can have its own billing and shipping addresses, tax settings, and buyer experience configuration. You can assign staff members and CompanyContact objects to manage the location.

Arguments

•ID!
required

The ID of the company that the company location belongs to.

•CompanyLocationInput!
required

The fields to use to create the company location.


•mutation

Deletes a company location.

Arguments

•ID!
required

The ID of the company location to delete.


•mutation

Deletes one or more existing mappings between a staff member at a shop and a company location.

Arguments

Anchor to companyLocationStaffMemberAssignmentIdscompanyLocationStaffMemberAssignmentIds
•[ID!]!
required

The list of IDs of the company location staff member assignment to delete.


•mutation

Revokes roles on a company location.

Arguments

•ID!
required

The location whose roles are being revoked.

•[ID!]!
required

The current roles to revoke.


•mutation

Deletes a list of company locations.

Arguments

•[ID!]!
required

A list of IDs of company locations to delete.


•mutation

Sets the tax settings for a company location.

Arguments

•ID!
required

The ID of the company location that the tax settings get assigned to.

•String

The unique tax registration ID for the company location.

•Boolean

Whether the location is exempt from taxes.

•[TaxExemption!]

The list of tax exemptions to assign to the company location.

•[TaxExemption!]

The list of tax exemptions to remove from the company location.


•mutation

Updates a company location's information and B2B checkout settings. Company locations are branches or offices where CompanyContact members place orders on behalf of the company. Contacts must be assigned to a location through roleAssignments to place orders.

The mutation modifies details such as the location's name, contact information, preferred locale, and internal notes. You can also configure the B2B checkout experience through BuyerExperienceConfiguration settings that control whether orders require merchant review, PaymentTermsTemplate settings, shipping address editing permissions, and DepositConfiguration requirements.

Learn more about managing company locations.

Arguments

•ID!
required

The ID of the company location to update.

•CompanyLocationUpdateInput!
required

The input fields to update in the company location.


•mutation

Revokes the main contact from the company.

Arguments

•ID!
required

The ID of the company to revoke the main contact from.


•mutation

Updates a Company with new information. Companies represent business customers that can have multiple contacts and locations with specific pricing, payment terms, and checkout settings.

The mutation accepts the company's ID and an input object containing the fields to update. You can modify the company name, add or update internal notes, set an external ID for integration with other systems, or adjust the customer relationship start date.

Learn more about building B2B features.

Arguments

•ID!
required

The ID of the company to be updated.

•CompanyInput!
required

The input fields to update the company.


Deprecated mutations

•mutation
Deprecated

Arguments

•ID!
required

The location to which the tax exemptions will be assigned.

•[TaxExemption!]!
required

The tax exemptions that are being assigned to the location.


•mutation
Deprecated

Arguments

•ID!
required

The ID of the company location that the tax registration gets assigned to.

•String!
required

The unique tax id for the tax registration.


•mutation
Deprecated

Arguments

•ID!
required

The location from which the tax exemptions will be revoked.

•[TaxExemption!]!
required

The tax exemptions that are being revoked from the location.


•mutation
Deprecated

Arguments

•ID!
required

The location whose tax registration is being revoked.



Was this section helpful?


Was this section helpful?