Anchor to section titled 'undefined'

shippingPackageUpdate
mutation

Requires Any of shipping access scopes or manage_delivery_settings user permission.

Updates a shipping package.


Anchor to id
id
required

The ID of the shipping package to update.

Specifies the input fields for a shipping package.


Was this section helpful?

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation shippingPackageUpdate($id: ID!, $shippingPackage: CustomShippingPackageInput!) {
  shippingPackageUpdate(id: $id, shippingPackage: $shippingPackage) {
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "id": "gid://shopify/<objectName>/10079785100",
  "shippingPackage": {
    "default": true,
    "dimensions": {
      "height": 1.1,
      "length": 1.1,
      "unit": "CENTIMETERS",
      "width": 1.1
    },
    "name": "<your-name>",
    "type": "BOX",
    "weight": {
      "unit": "GRAMS",
      "value": 1.1
    }
  }
}
input CustomShippingPackageInput {
  default: Boolean
  dimensions: ObjectDimensionsInput
  name: String
  type: ShippingPackageType
  weight: WeightInput
}

input ObjectDimensionsInput {
  height: Float!
  length: Float!
  unit: LengthUnit!
  width: Float!
}

input WeightInput {
  unit: WeightUnit!
  value: Float!
}