Anchor to section titled 'undefined'

companyLocationCreate
mutation

Requires write_customers access scope or write_companies access scope. Also: The API client must be installed on a Shopify Plus store.

Creates a company location.


Anchor to companyId
companyId
required

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

The fields to use to create the company location.


Was this section helpful?

The created company location.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation companyLocationCreate($companyId: ID!, $input: CompanyLocationInput!) {
  companyLocationCreate(companyId: $companyId, input: $input) {
    companyLocation {
      # CompanyLocation fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "companyId": "gid://shopify/<objectName>/10079785100",
  "input": {
    "billingAddress": {
      "address1": "<your-address1>",
      "address2": "<your-address2>",
      "city": "<your-city>",
      "countryCode": "AC",
      "firstName": "<your-firstName>",
      "lastName": "<your-lastName>",
      "phone": "<your-phone>",
      "recipient": "<your-recipient>",
      "zip": "<your-zip>",
      "zoneCode": "<your-zoneCode>"
    },
    "billingSameAsShipping": true,
    "buyerExperienceConfiguration": {
      "checkoutToDraft": true,
      "editableShippingAddress": true,
      "paymentTermsTemplateId": "gid://shopify/<objectName>/10079785100"
    },
    "externalId": "<your-externalId>",
    "locale": "<your-locale>",
    "name": "<your-name>",
    "note": "<your-note>",
    "phone": "<your-phone>",
    "shippingAddress": {
      "address1": "<your-address1>",
      "address2": "<your-address2>",
      "city": "<your-city>",
      "countryCode": "AC",
      "firstName": "<your-firstName>",
      "lastName": "<your-lastName>",
      "phone": "<your-phone>",
      "recipient": "<your-recipient>",
      "zip": "<your-zip>",
      "zoneCode": "<your-zoneCode>"
    },
    "taxExemptions": [
      "CA_BC_COMMERCIAL_FISHERY_EXEMPTION"
    ],
    "taxRegistrationId": "<your-taxRegistrationId>"
  }
}
input CompanyLocationInput {
  billingAddress: CompanyAddressInput
  billingSameAsShipping: Boolean
  buyerExperienceConfiguration: BuyerExperienceConfigurationInput
  externalId: String
  locale: String
  name: String
  note: String
  phone: String
  shippingAddress: CompanyAddressInput
  taxExemptions: [TaxExemption!]
  taxRegistrationId: String
}

input CompanyAddressInput {
  address1: String
  address2: String
  city: String
  countryCode: CountryCode
  firstName: String
  lastName: String
  phone: String
  recipient: String
  zip: String
  zoneCode: String
}

input BuyerExperienceConfigurationInput {
  checkoutToDraft: Boolean
  editableShippingAddress: Boolean
  paymentTermsTemplateId: ID
}