younifyd
Menu

companyLocationAssignAddress

Updates an address on a company location.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the companyLocationAssignAddress action (under Company).
  3. Fill in the fields below, then reference the result from later steps as {{companylocationassignaddress.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation CompanyLocationAssignAddress($locationId: ID!, $address: CompanyAddressInput!, $addressTypes: [CompanyAddressType!]!) {
  companyLocationAssignAddress(
    locationId: $locationId
    address: $address
    addressTypes: $addressTypes
  ) {
    addresses {
      address1
      address2
      city
      companyName
      country
      countryCode
      createdAt
      firstName
      formattedArea
      id
      lastName
      phone
      province
      recipient
      updatedAt
      zip
      zoneCode
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

locationIdstringrequired

The ID of the company location to update addresses on.

addressobjectrequired

The input fields to use to update the address.

address1string
address2string
citystring
zipstring
recipientstring
firstNamestring
lastNamestring
phonestring
zoneCodestring
countryCodestring

One ofAFAXALDZADAOAIAGARAMAWACAUATAZBSBHBDBBBYBEBZBJBMBTBOBABWBVBRIOBNBGBFBIKHCACVBQKY

addressTypesarray<string>required

The list of address types on the location to update.

json
{
  "locationId": "string",
  "address": {
    "address1": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "recipient": "string",
    "firstName": "string",
    "lastName": "string",
    "phone": "string",
    "zoneCode": "string",
    "countryCode": "AF"
  },
  "addressTypes": [
    "BILLING"
  ]
}

Response

Read the result with {{companylocationassignaddress.response.data.data.companyLocationAssignAddress}}. If the API returns errors, the step fails and they are at {{companylocationassignaddress.response.data.errors}}.

addressesarray<object>
address1object
address2object
cityobject
companyNameobject
countryobject
countryCodeobject
createdAtobject
firstNameobject
formattedAreaobject
idobject
lastNameobject
phoneobject
provinceobject
recipientobject
updatedAtobject
zipobject
zoneCodeobject
userErrorsarray<object>
codeobject
fieldobject
messageobject

Need more? See the Shopify guide for connection setup and behaviour shared by every action.