> ## Documentation Index
> Fetch the complete documentation index at: https://developers.appstle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update shipping address for subscription contract

> Changes the delivery shipping address for a subscription contract. This allows customers to update where their subscription orders are delivered.

**Key Features:**
- **Full Address Update**: Change complete shipping address in one call
- **Address Validation**: System validates address format and country codes
- **Immediate Effect**: New address applies to the next delivery
- **Activity Logging**: All address changes are logged for audit trail
- **International Support**: Supports addresses in all countries

**Required Address Fields:**
- **firstName**: Recipient's first name
- **lastName**: Recipient's last name
- **address1**: Street address line 1
- **city**: City name
- **countryCode**: ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
- **zip**: Postal/ZIP code

**Optional Address Fields:**
- **address2**: Apartment, suite, unit number
- **company**: Company name (for business addresses)
- **phone**: Contact phone number
- **provinceCode**: State/province code (e.g., CA, NY, ON)

**Common Use Cases:**
- **Customer Moved**: Update address after relocation
- **Temporary Address**: Ship to vacation home or temporary location
- **Gift Recipient**: Change recipient for gift subscriptions
- **Correct Typos**: Fix address errors from initial signup
- **Business to Home**: Switch between business and residential addresses
- **Seasonal Address**: Update for snowbird/seasonal residents

**Country and Province Codes:**
- **countryCode**: Use ISO 3166-1 alpha-2 codes
  - Examples: US (United States), CA (Canada), GB (United Kingdom), AU (Australia)
- **provinceCode**: Use ISO 3166-2 subdivision codes
  - US Examples: CA (California), NY (New York), TX (Texas)
  - Canada Examples: ON (Ontario), BC (British Columbia), QC (Quebec)

**Address Validation:**
- **Format Validation**: System checks required fields are present
- **Country Validation**: Verifies country code is valid
- **Province Validation**: Checks province code matches country
- **Postal Code**: Validates postal code format for country

**Important Notes:**
- **Shipping Rate Recalculation**: New address may have different shipping costs
- **Delivery Method**: System automatically selects appropriate delivery method
- **Next Order Only**: Only affects future orders, not orders already placed
- **Address Book**: Consider updating customer's default address separately
- **PO Boxes**: Some delivery methods may not support PO Box addresses

**Shipping Cost Impact:**
- Changing address may change shipping costs for future deliveries
- International addresses typically have higher shipping costs
- Remote/rural areas may have additional delivery fees
- Consider notifying customer of cost changes

**Authentication:** Requires API key authentication via X-API-Key header or api_key parameter



## OpenAPI

````yaml /memberships/admin-api-swagger.json put /api/external/v2/subscription-contracts-update-shipping-address
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing memberships, payments, and
    related operations. These APIs allow you to programmatically manage
    membership lifecycles, handle payments, configure products, and integrate
    membership functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://membership-admin.appstle.com
security: []
tags:
  - description: >-
      APIs for managing Shopify delivery profiles, shipping rates, zones, and
      free shipping configuration for subscription memberships
    name: Shipping & Delivery Profiles
  - description: >-
      APIs for retrieving historical discount code usage and redemption
      information for membership contracts
    name: Customer Discount History
  - description: >-
      APIs for managing membership cancellation flow settings including
      retention offers, survey questions, and cancel confirmation screens
    name: Cancellation Flow Configuration
  - description: >-
      APIs for managing membership billing attempts, recurring orders, payment
      retries, order history, and order skipping
    name: Billing & Orders
  - description: >-
      APIs for managing one-time product additions to upcoming subscription
      orders, including adding, retrieving, and removing one-off items
    name: One-Time Add-Ons
  - description: >-
      APIs for managing membership/subscription plan groups, including creating
      plans, configuring discounts, billing intervals, and assigning products to
      plans
    name: Membership Plans
  - description: >-
      APIs for managing subscription product bundles, bundle configurations,
      item grouping, and bundle-specific discount codes
    name: Product Bundles
  - description: >-
      APIs for retrieving custom CSS styles applied to subscription widgets and
      customer portal for theme customization
    name: Custom CSS Styling
  - description: >-
      APIs for managing customer portal settings including UI customization,
      text labels, feature toggles, and branding options for the member
      self-service portal
    name: Customer Portal Configuration
  - description: >-
      APIs for managing membership/subscription contracts including creation,
      updates, status changes, line items, discounts, and billing operations
    name: Membership Contracts
  - description: >-
      APIs for managing subscription bundle configuration settings including
      bundle behavior, pricing rules, and display options
    name: Bundle Settings
  - description: >-
      APIs for managing customer payment methods, payment tokens, and payment
      method retrieval for subscriptions
    name: Customer Payment Methods
  - description: >-
      APIs for retrieving product swap/substitution options allowing members to
      exchange subscription items based on configured swap rules and variant
      groups
    name: Product Swap Rules
  - description: >-
      APIs for retrieving product catalog, variants, pricing, and inventory
      information for subscription memberships.
    name: Product & Inventory Data
  - description: >-
      APIs for managing shop-level membership settings, configuration, and
      general store information.
    name: Shop Settings
  - description: >-
      APIs for performing bulk/mass operations on multiple membership contracts
      including status updates, product replacements, and billing date changes.
    name: Bulk Operations
paths:
  /api/external/v2/subscription-contracts-update-shipping-address:
    put:
      tags:
        - Membership Contracts
      summary: Update shipping address for subscription contract
      description: >-
        Changes the delivery shipping address for a subscription contract. This
        allows customers to update where their subscription orders are
        delivered.


        **Key Features:**

        - **Full Address Update**: Change complete shipping address in one call

        - **Address Validation**: System validates address format and country
        codes

        - **Immediate Effect**: New address applies to the next delivery

        - **Activity Logging**: All address changes are logged for audit trail

        - **International Support**: Supports addresses in all countries


        **Required Address Fields:**

        - **firstName**: Recipient's first name

        - **lastName**: Recipient's last name

        - **address1**: Street address line 1

        - **city**: City name

        - **countryCode**: ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)

        - **zip**: Postal/ZIP code


        **Optional Address Fields:**

        - **address2**: Apartment, suite, unit number

        - **company**: Company name (for business addresses)

        - **phone**: Contact phone number

        - **provinceCode**: State/province code (e.g., CA, NY, ON)


        **Common Use Cases:**

        - **Customer Moved**: Update address after relocation

        - **Temporary Address**: Ship to vacation home or temporary location

        - **Gift Recipient**: Change recipient for gift subscriptions

        - **Correct Typos**: Fix address errors from initial signup

        - **Business to Home**: Switch between business and residential
        addresses

        - **Seasonal Address**: Update for snowbird/seasonal residents


        **Country and Province Codes:**

        - **countryCode**: Use ISO 3166-1 alpha-2 codes
          - Examples: US (United States), CA (Canada), GB (United Kingdom), AU (Australia)
        - **provinceCode**: Use ISO 3166-2 subdivision codes
          - US Examples: CA (California), NY (New York), TX (Texas)
          - Canada Examples: ON (Ontario), BC (British Columbia), QC (Quebec)

        **Address Validation:**

        - **Format Validation**: System checks required fields are present

        - **Country Validation**: Verifies country code is valid

        - **Province Validation**: Checks province code matches country

        - **Postal Code**: Validates postal code format for country


        **Important Notes:**

        - **Shipping Rate Recalculation**: New address may have different
        shipping costs

        - **Delivery Method**: System automatically selects appropriate delivery
        method

        - **Next Order Only**: Only affects future orders, not orders already
        placed

        - **Address Book**: Consider updating customer's default address
        separately

        - **PO Boxes**: Some delivery methods may not support PO Box addresses


        **Shipping Cost Impact:**

        - Changing address may change shipping costs for future deliveries

        - International addresses typically have higher shipping costs

        - Remote/rural areas may have additional delivery fees

        - Consider notifying customer of cost changes


        **Authentication:** Requires API key authentication via X-API-Key header
        or api_key parameter
      operationId: updateShippingAddressV2
      parameters:
        - description: Subscription contract ID
          example: 12345
          in: query
          name: contractId
          required: true
          schema:
            format: int64
            type: integer
        - description: API Key (Deprecated - Use Header X-API-Key instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            examples:
              US Address Example:
                description: US Address Example
                value:
                  address1: 123 Main Street
                  address2: Apt 4B
                  city: San Francisco
                  company: Acme Corp
                  countryCode: US
                  firstName: John
                  lastName: Doe
                  phone: +1-415-555-0123
                  provinceCode: CA
                  zip: '94102'
            schema:
              $ref: '#/components/schemas/ChangeShippingAddressVM'
        description: New shipping address details
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Shipping address successfully updated
        '400':
          content:
            application/json:
              examples:
                Invalid country code:
                  description: Invalid country code
                  value:
                    detail: 'Invalid country code: XX'
                    status: 400
                    title: Bad Request
                Missing required field:
                  description: Missing required field
                  value:
                    detail: 'Required address field missing: countryCode'
                    status: 400
                    title: Bad Request
          description: Invalid address format or missing required fields
        '401':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Authentication required - invalid or missing API key
        '404':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Subscription contract not found
        '500':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Shopify API error during address update
components:
  schemas:
    ChangeShippingAddressVM:
      properties:
        address1:
          description: Primary street address
          example: 123 Main St
          type: string
        address2:
          description: Secondary address line (apt, suite, etc.)
          example: Apt 4B
          type: string
        city:
          description: City name
          example: New York
          type: string
        company:
          description: Company name
          example: Acme Inc
          type: string
        country:
          description: Country name
          example: United States
          type: string
        countryCode:
          description: ISO country code
          example: US
          type: string
        firstName:
          description: Recipient first name
          example: John
          type: string
        lastName:
          description: Recipient last name
          example: Doe
          type: string
        phone:
          description: Contact phone number
          example: +1-555-123-4567
          type: string
        province:
          description: State or province name
          example: New York
          type: string
        provinceCode:
          description: State/province code
          example: NY
          type: string
        zip:
          description: Postal/ZIP code
          example: '10001'
          type: string
      type: object
    SubscriptionContract:
      properties:
        billingAttempts:
          $ref: '#/components/schemas/BillingAttempts'
        billingPolicy:
          $ref: '#/components/schemas/BillingPolicy'
        createdAt:
          type: object
        customAttributes:
          items:
            $ref: '#/components/schemas/CustomAttribute1'
          type: array
        customer:
          $ref: '#/components/schemas/Customer'
        customerPaymentMethod:
          $ref: '#/components/schemas/CustomerPaymentMethod'
        deliveryMethod:
          $ref: '#/components/schemas/DeliveryMethod'
        deliveryPolicy:
          $ref: '#/components/schemas/DeliveryPolicy'
        deliveryPrice:
          $ref: '#/components/schemas/DeliveryPrice'
        discounts:
          $ref: '#/components/schemas/Discounts'
        get__typename:
          type: string
        id:
          type: string
        lastPaymentStatus:
          enum:
            - SUCCEEDED
            - FAILED
            - $UNKNOWN
          type: string
        lines:
          $ref: '#/components/schemas/Lines'
        nextBillingDate:
          type: object
        note:
          type: string
        originOrder:
          $ref: '#/components/schemas/OriginOrder'
        status:
          enum:
            - ACTIVE
            - PAUSED
            - CANCELLED
            - EXPIRED
            - FAILED
            - $UNKNOWN
          type: string
        updatedAt:
          type: object
      type: object
    BillingAttempts:
      properties:
        get__typename:
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/Node3'
          type: array
      type: object
    BillingPolicy:
      properties:
        anchors:
          items:
            $ref: '#/components/schemas/Anchor'
          type: array
        get__typename:
          type: string
        interval:
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
            - $UNKNOWN
          type: string
        intervalCount:
          format: int32
          type: integer
        maxCycles:
          format: int32
          type: integer
        minCycles:
          format: int32
          type: integer
      type: object
    CustomAttribute1:
      properties:
        get__typename:
          type: string
        key:
          type: string
        value:
          type: string
      type: object
    Customer:
      properties:
        displayName:
          type: string
        email:
          deprecated: true
          type: string
        firstName:
          type: string
        get__typename:
          type: string
        id:
          type: string
        lastName:
          type: string
        phone:
          deprecated: true
          type: string
      type: object
    CustomerPaymentMethod:
      properties:
        get__typename:
          type: string
        id:
          type: string
        instrument:
          $ref: '#/components/schemas/Instrument'
        revokedAt:
          type: object
        revokedReason:
          enum:
            - AUTHORIZE_NET_GATEWAY_NOT_ENABLED
            - AUTHORIZE_NET_RETURNED_NO_PAYMENT_METHOD
            - FAILED_TO_UPDATE_CREDIT_CARD
            - STRIPE_API_AUTHENTICATION_ERROR
            - STRIPE_API_INVALID_REQUEST_ERROR
            - STRIPE_GATEWAY_NOT_ENABLED
            - STRIPE_RETURNED_NO_PAYMENT_METHOD
            - STRIPE_PAYMENT_METHOD_NOT_CARD
            - BRAINTREE_API_AUTHENTICATION_ERROR
            - BRAINTREE_GATEWAY_NOT_ENABLED
            - BRAINTREE_RETURNED_NO_PAYMENT_METHOD
            - BRAINTREE_PAYMENT_METHOD_NOT_CARD
            - PAYMENT_METHOD_VERIFICATION_FAILED
            - THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED
            - MANUALLY_REVOKED
            - FAILED_TO_RETRIEVE_BILLING_ADDRESS
            - MERGED
            - CUSTOMER_REDACTED
            - TOO_MANY_CONSECUTIVE_FAILURES
            - CVV_ATTEMPTS_LIMIT_EXCEEDED
            - $UNKNOWN
          type: string
      type: object
    DeliveryMethod:
      properties:
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
        brandedPromise:
          $ref: '#/components/schemas/BrandedPromise'
        get__typename:
          type: string
        id:
          type: string
        maxDeliveryDateTime:
          type: object
        methodType:
          enum:
            - SHIPPING
            - PICK_UP
            - NONE
            - RETAIL
            - LOCAL
            - PICKUP_POINT
            - $UNKNOWN
          type: string
        minDeliveryDateTime:
          type: object
        serviceCode:
          type: string
      type: object
    DeliveryPolicy:
      properties:
        anchors:
          items:
            $ref: '#/components/schemas/Anchor1'
          type: array
        get__typename:
          type: string
        interval:
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
            - $UNKNOWN
          type: string
        intervalCount:
          format: int32
          type: integer
      type: object
    DeliveryPrice:
      properties:
        amount:
          type: object
        currencyCode:
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
          type: string
        get__typename:
          type: string
      type: object
    Discounts:
      properties:
        get__typename:
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/Node2'
          type: array
        pageInfo:
          $ref: '#/components/schemas/PageInfo2'
      type: object
    Lines:
      properties:
        get__typename:
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/Node'
          type: array
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
      type: object
    OriginOrder:
      properties:
        fulfillmentOrders:
          $ref: '#/components/schemas/FulfillmentOrders'
        get__typename:
          type: string
        id:
          type: string
        name:
          type: string
      type: object
    Node3:
      properties:
        completedAt:
          type: object
        createdAt:
          type: object
        get__typename:
          type: string
        id:
          type: string
        idempotencyKey:
          type: string
        ready:
          deprecated: true
          type: boolean
      type: object
    Anchor:
      properties:
        cutoffDay:
          format: int32
          type: integer
        day:
          format: int32
          type: integer
        get__typename:
          type: string
        month:
          format: int32
          type: integer
        type:
          enum:
            - WEEKDAY
            - MONTHDAY
            - YEARDAY
            - $UNKNOWN
          type: string
      type: object
    Instrument:
      properties:
        get__typename:
          type: string
      type: object
    AdditionalInformation:
      properties:
        get__typename:
          type: string
        instructions:
          type: string
      type: object
    BrandedPromise:
      properties:
        get__typename:
          type: string
        handle:
          type: string
        name:
          type: string
      type: object
    Anchor1:
      properties:
        cutoffDay:
          format: int32
          type: integer
        day:
          format: int32
          type: integer
        get__typename:
          type: string
        month:
          format: int32
          type: integer
        type:
          enum:
            - WEEKDAY
            - MONTHDAY
            - YEARDAY
            - $UNKNOWN
          type: string
      type: object
    Node2:
      properties:
        createdAt:
          type: object
        deliveredAt:
          type: object
        displayStatus:
          enum:
            - ATTEMPTED_DELIVERY
            - CANCELED
            - CONFIRMED
            - DELAYED
            - DELIVERED
            - FAILURE
            - FULFILLED
            - CARRIER_PICKED_UP
            - IN_TRANSIT
            - LABEL_PRINTED
            - LABEL_PURCHASED
            - LABEL_VOIDED
            - MARKED_AS_FULFILLED
            - NOT_DELIVERED
            - OUT_FOR_DELIVERY
            - READY_FOR_PICKUP
            - PICKED_UP
            - SUBMITTED
            - $UNKNOWN
          type: string
        estimatedDeliveryAt:
          type: object
        get__typename:
          type: string
        id:
          type: string
        inTransitAt:
          type: object
        name:
          type: string
        requiresShipping:
          type: boolean
        service:
          $ref: '#/components/schemas/Service'
        status:
          enum:
            - PENDING
            - OPEN
            - SUCCESS
            - CANCELLED
            - ERROR
            - FAILURE
            - $UNKNOWN
          type: string
        trackingInfo:
          items:
            $ref: '#/components/schemas/TrackingInfo'
          type: array
      type: object
    PageInfo2:
      properties:
        endCursor:
          type: string
        get__typename:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
        startCursor:
          type: string
      type: object
    Node:
      properties:
        get__typename:
          type: string
      type: object
    PageInfo:
      properties:
        endCursor:
          type: string
        get__typename:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
        startCursor:
          type: string
      type: object
    FulfillmentOrders:
      properties:
        get__typename:
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/Node'
          type: array
        pageInfo:
          $ref: '#/components/schemas/PageInfo2'
      type: object
    Service:
      properties:
        get__typename:
          type: string
        handle:
          type: string
        serviceName:
          type: string
        type:
          enum:
            - GIFT_CARD
            - MANUAL
            - THIRD_PARTY
            - $UNKNOWN
          type: string
      type: object
    TrackingInfo:
      properties:
        company:
          type: string
        get__typename:
          type: string
        number:
          type: string
        url:
          type: object
      type: object

````