Business Customer User Error
Requires access scope or access scope.
An error that happens during the execution of a business customer mutation.
Anchor to FieldsFields
- code (BusinessCustomerErrorCode)
- field ([String!])
- message (String!)
- Anchor to codecode•Business
Customer Error Code The error code.
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Anchor to MutationsMutations
- companiesDelete (CompaniesDeletePayload)
- companyAddressDelete (CompanyAddressDeletePayload)
- companyAssignCustomerAsContact (CompanyAssignCustomerAsContactPayload)
- companyAssignMainContact (CompanyAssignMainContactPayload)
- companyContactAssignRole (CompanyContactAssignRolePayload)
- companyContactAssignRoles (CompanyContactAssignRolesPayload)
- companyContactCreate (CompanyContactCreatePayload)
- companyContactDelete (CompanyContactDeletePayload)
- companyContactRemoveFromCompany (CompanyContactRemoveFromCompanyPayload)
- companyContactRevokeRole (CompanyContactRevokeRolePayload)
- companyContactRevokeRoles (CompanyContactRevokeRolesPayload)
- companyContactsDelete (CompanyContactsDeletePayload)
- companyContactUpdate (CompanyContactUpdatePayload)
- companyCreate (CompanyCreatePayload)
- companyDelete (CompanyDeletePayload)
- companyLocationAssignAddress (CompanyLocationAssignAddressPayload)
- companyLocationAssignRoles (CompanyLocationAssignRolesPayload)
- companyLocationAssignStaffMembers (CompanyLocationAssignStaffMembersPayload)
- companyLocationCreate (CompanyLocationCreatePayload)
- companyLocationDelete (CompanyLocationDeletePayload)
- companyLocationRemoveStaffMembers (CompanyLocationRemoveStaffMembersPayload)
- companyLocationRevokeRoles (CompanyLocationRevokeRolesPayload)
- companyLocationsDelete (CompanyLocationsDeletePayload)
- companyLocationTaxSettingsUpdate (CompanyLocationTaxSettingsUpdatePayload)
- companyLocationUpdate (CompanyLocationUpdatePayload)
- companyRevokeMainContact (CompanyRevokeMainContactPayload)
- companyUpdate (CompanyUpdatePayload)
- •mutation
Deletes a list of companies.
- Anchor to companyIdscompany•[ID!]!
Ids required A list of IDs of companies to delete.
Arguments
- •mutation
Deletes a company address.
- Anchor to addressIdaddress•ID!
Id required The ID of the address to delete.
Arguments
- •mutation
Adds an existing
Customeras a contact to aCompany. 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
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.- Anchor to companyIdcompany•ID!
Id required The ID of the company to assign the contact to.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer to assign as the contact.
Arguments
- •mutation
Assigns the main contact for the company.
- Anchor to companyIdcompany•ID!
Id required The ID of the company to assign the main contact to.
- Anchor to companyContactIdcompany•ID!
Contact Id required The ID of the company contact to be assigned as the main contact.
Arguments
- •mutation
Assigns a role to a contact for a location.
- Anchor to companyContactIdcompany•ID!
Contact Id required The ID of the contact to assign a role to.
- Anchor to companyContactRoleIdcompany•ID!
Contact Role Id required The ID of the role to assign to a contact.
- Anchor to companyLocationIdcompany•ID!
Location Id required The ID of the location to assign a role to a contact.
Arguments
- •mutation
Assigns roles on a company contact.
- Anchor to companyContactIdcompany•ID!
Contact Id required The contact whose roles are being assigned.
- Anchor to rolesToAssignroles•[Company
To Assign Contact Role Assign!]! required The new roles to assign.
Arguments
- •mutation
Creates a company contact and the associated customer.
- Anchor to companyIdcompany•ID!
Id required The ID of the company that the company contact belongs to.
- Anchor to inputinput•Company
Contact Input! required The fields to use to create the company contact.
Arguments
- •mutation
Deletes a company contact.
- Anchor to companyContactIdcompany•ID!
Contact Id required The ID of the company contact to delete.
Arguments
- •mutation
Removes a company contact from a Company.
- Anchor to companyContactIdcompany•ID!
Contact Id required The ID of the company contact to remove from the Company.
Arguments
- •mutation
Revokes a role on a company contact.
- Anchor to companyContactIdcompany•ID!
Contact Id required The ID of the contact to revoke a role from.
- Anchor to companyContactRoleAssignmentIdcompany•ID!
Contact Role Assignment Id required The ID of the role assignment to revoke from a contact.
Arguments
- •mutation
Revokes roles on a company contact.
- Anchor to companyContactIdcompany•ID!
Contact Id required The contact whose roles are being revoked.
- Anchor to roleAssignmentIdsrole•[ID!]
Assignment Ids The current role assignment IDs to revoke.
- Anchor to revokeAllrevoke•Boolean
All Default:false Flag to revoke all roles on the contact.
Arguments
- •mutation
Deletes one or more company contacts.
- Anchor to companyContactIdscompany•[ID!]!
Contact Ids required The list of IDs of the company contacts to delete.
Arguments
- •mutation
Updates a company contact.
- Anchor to companyContactIdcompany•ID!
Contact Id required The ID of the company contact to be updated.
- Anchor to inputinput•Company
Contact Input! required The fields to use to update the company contact.
Arguments
- •mutation
Creates a
Companyfor B2B commerce. This mutation creates the company and can optionally create an initialandin 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.NoteCreating a company without a
namereturns an error.Note:Creating a company without a
namereturns an error.Note: Creating a company without a <code>name</code> <a href="https://shopify.dev/docs/api/admin-graphql/latest/mutations/companycreate?example=creating-a-company-without-a-name-returns-an-error">returns an error</a>.
Learn more about creating companies for B2B.
- Anchor to inputinput•Company
Create Input! required The fields to use when creating the company.
Arguments
- •mutation
Deletes a company.
- •ID!required
The ID of the company to delete.
Arguments
- •ID!
- •mutation
Updates an address on a company location.
- Anchor to locationIdlocation•ID!
Id required The ID of the company location to update addresses on.
- Anchor to addressaddress•Company
Address Input! required The input fields to use to update the address.
- Anchor to addressTypesaddress•[Company
Types Address Type!]! required The list of address types on the location to update.
Arguments
- •mutation
Assigns roles on a company location.
- Anchor to companyLocationIdcompany•ID!
Location Id required The location whose roles are being assigned.
- Anchor to rolesToAssignroles•[Company
To Assign Location Role Assign!]! required The roles to assign.
Arguments
- •mutation
Creates one or more mappings between a staff member at a shop and a company location.
- Anchor to companyLocationIdcompany•ID!
Location Id required The ID of the company location to assign the staff member to.
- Anchor to staffMemberIdsstaff•[ID!]!
Member Ids required The list of IDs of the staff members to assign.
Arguments
- •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 andobjects to manage the location.- Anchor to companyIdcompany•ID!
Id required The ID of the company that the company location belongs to.
- Anchor to inputinput•Company
Location Input! required The fields to use to create the company location.
Arguments
- •mutation
Deletes a company location.
- Anchor to companyLocationIdcompany•ID!
Location Id required The ID of the company location to delete.
Arguments
- •mutation
Deletes one or more existing mappings between a staff member at a shop and a company location.
- Anchor to companyLocationStaffMemberAssignmentIdscompany•[ID!]!
Location Staff Member Assignment Ids required The list of IDs of the company location staff member assignment to delete.
Arguments
- •mutation
Revokes roles on a company location.
- Anchor to companyLocationIdcompany•ID!
Location Id required The location whose roles are being revoked.
- Anchor to rolesToRevokeroles•[ID!]!
To Revoke required The current roles to revoke.
Arguments
- •mutation
Deletes a list of company locations.
- Anchor to companyLocationIdscompany•[ID!]!
Location Ids required A list of IDs of company locations to delete.
Arguments
- •mutation
Sets the tax settings for a company location.
- Anchor to companyLocationIdcompany•ID!
Location Id required The ID of the company location that the tax settings get assigned to.
- Anchor to taxRegistrationIdtax•String
Registration Id The unique tax registration ID for the company location.
- Anchor to taxExempttax•Boolean
Exempt Whether the location is exempt from taxes.
- Anchor to exemptionsToAssignexemptions•[Tax
To Assign Exemption!] The list of tax exemptions to assign to the company location.
- Anchor to exemptionsToRemoveexemptions•[Tax
To Remove Exemption!] The list of tax exemptions to remove from the company location.
Arguments
- •mutation
Updates a company location's information and B2B checkout settings. Company locations are branches or offices where
members place orders on behalf of the company. Contacts must be assigned to a location throughto 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
settings that control whether orders require merchant review,settings, shipping address editing permissions, andrequirements.Learn more about managing company locations.
- Anchor to companyLocationIdcompany•ID!
Location Id required The ID of the company location to update.
- Anchor to inputinput•Company
Location Update Input! required The input fields to update in the company location.
Arguments
- •mutation
Revokes the main contact from the company.
- Anchor to companyIdcompany•ID!
Id required The ID of the company to revoke the main contact from.
Arguments
- •mutation
Updates a
Companywith 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.
- Anchor to companyIdcompany•ID!
Id required The ID of the company to be updated.
- Anchor to inputinput•Company
Input! required The input fields to update the company.
Arguments
Deprecated mutations
- companyLocationAssignTaxExemptions (CompanyLocationAssignTaxExemptionsPayload): deprecated
- companyLocationCreateTaxRegistration (CompanyLocationCreateTaxRegistrationPayload): deprecated
- companyLocationRevokeTaxExemptions (CompanyLocationRevokeTaxExemptionsPayload): deprecated
- companyLocationRevokeTaxRegistration (CompanyLocationRevokeTaxRegistrationPayload): deprecated
- •mutationDeprecated
- Anchor to companyLocationIdcompany•ID!
Location Id required The location to which the tax exemptions will be assigned.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! required The tax exemptions that are being assigned to the location.
Arguments
- •mutationDeprecated
- Anchor to locationIdlocation•ID!
Id required The ID of the company location that the tax registration gets assigned to.
- Anchor to taxIdtax•String!
Id required The unique tax id for the tax registration.
Arguments
- •mutationDeprecated
- Anchor to companyLocationIdcompany•ID!
Location Id required The location from which the tax exemptions will be revoked.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! required The tax exemptions that are being revoked from the location.
Arguments
- •mutationDeprecated
- Anchor to companyLocationIdcompany•ID!
Location Id required The location whose tax registration is being revoked.
Arguments