Edit in GitHubLog an issue
Adobe Commerce featureExclusive feature only in Adobe Commerce (Learn more)

assignChildCompany mutation

The assignChildCompany mutation allows company administrators to assign a child company to a parent company within the company hierarchy. This mutation requires parentId and childId as unique IDs of the companies as parameters. This mutation returns a company_hierarchy object if successful.

Syntax

Copied to your clipboard
{
assignChildCompany(
input: AssignChildCompanyInput!
): AssignChildCompanyOutput
}

Example usage

The following example assigns a child company to a parent company by the company admin.

Request:

Copied to your clipboard
mutation assignChildCompany($parentId: ID!, $childId: ID!) {
assignChildCompany(
input: {parent_company_id: "ODM5", child_company_id: "ABCD=="}
) {
company_hierarchy {
parent {
name
}
children {
name
}
}
}
}

Response:

Copied to your clipboard
{
"data": {
"assignChildCompany": {
"company_hierarchy": {
"parent": {
"name": "ParentCompanyName"
},
"children": [
{
"name": "ChildCompanyName"
}
]
}
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2026 Adobe. All rights reserved.