Skip to content

B2B Company Mutations - Create and Update Company #29074

Closed
@munkhulzii

Description

@munkhulzii

Description (*)

Partially solves #28867

Company mutations for B2B Company
It should be possible to create and update company account via GraphQl.

- createCompany

Example query:
mutation { createCompany( input: { company_name: "Company name" company_email: "company_email@example.com" legal_name: "Legal name" vat_tax_id: "123" reseller_id: "123" company_admin: { email: "company_admin@example.com" firstname: "Firstname" lastname: "Lastname" gender: 1 job_title: "Job Title" } legal_address: { city: "Example" country_id: US postcode: "12345" region: { region_id: 62 } street: ["Street"] telephone: "01212212112" } } ) { company { id email legal_name vat_id reseller_id company_admin { email firstname lastname gender } legal_address { street city postcode country_code telephone region { region_code region_id region } } } } }

- updateCompany
mutation { updateCompany( input: { company_name: "New Company name", company_email: "company_email@coomo.com", legal_name: "Legal name", vat_tax_id: "1234", reseller_id: "1234", legal_address: { city: "Example new", country_id: US, postcode: "12345", region: { region_id: 62 }, street: ["Street 123"], telephone: "0121221211211" } }) { company { id email legal_name vat_id reseller_id legal_address { street city postcode country_code telephone region { region_code region_id region } } } } }

Related Pull Requests

https://github.com/magento/partners-magento2b2b/pull/216

Fixed Issues (if relevant)

Manual testing scenarios (*)

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions