Anchor to shippingPackageUpdateshipping
shippingPackageUpdate
mutation
Requires Any of shipping
access scopes or user permission.
Updates a shipping package.
Anchor to Arguments
Arguments
- •ID!required
The ID of the shipping package to update.
- Anchor to shippingPackageshipping•
Package CustomShipping requiredPackage Input! Specifies the input fields for a shipping package.
Was this section helpful?
Anchor to ShippingPackageUpdatePayload returnsShippingPackageUpdatePayload returns
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation shippingPackageUpdate($id: ID!, $shippingPackage: CustomShippingPackageInput!) {
shippingPackageUpdate(id: $id, shippingPackage: $shippingPackage) {
userErrors {
field
message
}
}
}
Input
{
"id": "gid://shopify/<objectName>/10079785100",
"shippingPackage": {
"default": true,
"dimensions": {
"height": 1.1,
"length": 1.1,
"unit": "",
"width": 1.1
},
"name": "<your-name>",
"type": "",
"weight": {
"unit": "",
"value": 1.1
}
}
}
{
"id": "gid://shopify/<objectName>/10079785100",
"shippingPackage": {
"default": true,
"dimensions": {
"height": 1.1,
"length": 1.1,
"unit": "",
"width": 1.1
},
"name": "<your-name>",
"type": "",
"weight": {
"unit": "",
"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!
}