---
title: "checkoutShippingAddressUpdate"
description: "更新现有结帐的收货地址"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/mutations/checkout-shipping-address-update'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/mutations/checkout-shipping-address-update.md'
---
# checkoutShippingAddressUpdate

更新现有结帐的收货地址

- **Required Scopes:** `unauthenticated_write_checkouts_info`
- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Type Signature

`CheckoutShippingAddressUpdatePayload`

## Required Permissions

* `unauthenticated_write_checkouts_info`

接口访问需要令牌，具体如何获取令牌请参考：[身份认证](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/storefront-api/overview.md)

## Arguments

* `shippingAddress`

  [ShippingAddressInput!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/inputs/shipping-address-input.md)

  商品行将会派送到的收货地址

* `checkoutId`

  [String!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  结账ID

## Returns

* `checkout`

  [Checkout](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/objects/checkout.md)

  更新的结账对象

* `checkoutUserErrors`

  [[CheckoutUserError!]!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/objects/checkout-user-error.md)

  错误信息列表

## Code Example

```graphql
mutation checkoutShippingAddressUpdate($shippingAddress: ShippingAddressInput! $checkoutId: String! ) {
	checkoutShippingAddressUpdate(shippingAddress: $shippingAddress, checkoutId: $checkoutId ) 
		 {
			# CheckoutShippingAddressUpdatePayload fields
		}
		
	}

```

## Variables

```json
{
  "checkoutId": {},
  "shippingAddress": {
    "address1": "",
    "address2": "",
    "city": "",
    "company": "",
    "country": "",
    "firstName": "",
    "lastName": {},
    "phone": "",
    "province": "",
    "zip": ""
  }
}
```

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes)。

