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

# Update a shopper address



## OpenAPI

````yaml /api-reference/platform_v1.json patch /api/platform/v1/shoppers/{shopper_ref}/addresses/{address_ref}.json
openapi: 3.0.3
info:
  title: PLATFORM API V1
  version: 1.0.0
  contact:
    name: BSPK API Support
    email: bspk-support@bspk.com
  description: >-

    # Introduction


    The BSPK RESTful JSON API gives you access to your company's BSPK data.

    For all BSPK API related questions please email: *bspk-support@bspk.com*



    ### Authentication


    BSPK uses Token-Based API Authentication. API keys can be managed from the
    API Keys section in your admin interface. All unauthenticated requests will
    return an HTTP 401 response.


    **Important:**  Developers with BSPK API keys will be granted full access to
    the data in each endpoint. Access to this data is binary: everything or
    nothing.


    **Authorization header**

    Your  `Authorization`  header should be in the following format:

    ```

    Authorization: Bearer [API_KEY]

    ```


    ### Throttling


    API requests are limited to the amount specified in the returned
    `X-RateLimit-Limit` header (per 10 seconds). Exceeding that limit will cause
    BSPK to return an `HTTP 429` response. Check the `X-RateLimit-Limit` and
    `X-RateLimit-Remaining` headers to see how many more requests you are
    allowed until throttling kicks in.



    ### Error Codes


    - 400 - Bad Request.

    - 401 - Unauthorized – Invalid BSPK API key.

    - 404 - Not Found – Resource not found.

    - 422 - Unprocessable entity.

    - 429 - Throttle Limit reached.

    - 500 - BSPK Internal Server Error


    ### Validation


    Methods that take input will validate all parameters. Any parameter that
    fails validation will trigger an error response with status HTTP 422. The
    response body will be a JSON object like the example below which includes a
    list of fields that failed validation.


    `{'errors':[{'title': 'No clients found with IDs: [NON_EXISTING_ID,
    OTHER_NON_EXISTING_ID]','code':'not_found'}]}`



    ### Additional Information


    - Fields without a value will return null

    - Timestamps are rendered in ISO-8601 format (e.g. 2018-07-21T17:32:28Z)

    - BSPK reserves the right to add more properties to objects, but will never
    change or remove them. Any breaking changes will result in a major API
    version update.
         
servers:
  - url: https://api.bspk.com
    description: Production
security:
  - BearerAuth: []
paths:
  /api/platform/v1/shoppers/{shopper_ref}/addresses/{address_ref}.json:
    patch:
      tags:
        - Shopper Addresses
      summary: Update a shopper address
      operationId: updateShopperAddress
      parameters:
        - name: shopper_ref
          in: path
          description: Shopper external ID
          required: true
          schema:
            type: string
        - name: address_ref
          in: path
          description: Address external ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: object
                  properties:
                    external_id:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                    company_name:
                      type: string
                    address_1:
                      type: string
                    address_2:
                      type: string
                    address_3:
                      type: string
                    address_4:
                      type: string
                    city:
                      type: string
                    province:
                      type: string
                    province_code:
                      type: string
                    country:
                      type: string
                    country_code:
                      type: string
                    zip:
                      type: string
                    phone:
                      type: string
                    latitude:
                      type: number
                    longitude:
                      type: number
                    time_zone:
                      type: string
                    is_default:
                      type: boolean
      responses:
        '200':
          description: Address updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/address'
        '404':
          description: Shopper or address not found
          content:
            application/json:
              schema: {}
        '422':
          description: Validation error
          content:
            application/json:
              schema: {}
      security:
        - BearerAuth: []
components:
  schemas:
    address:
      type: object
      properties:
        id:
          type: integer
        external_id:
          type: string
          nullable: true
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        address:
          type: string
          nullable: true
        address_2:
          type: string
          nullable: true
        address_3:
          type: string
          nullable: true
        address_4:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        province:
          type: string
          nullable: true
        province_code:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        country_code:
          type: string
          nullable: true
        zip:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        latitude:
          type: string
          nullable: true
        longitude:
          type: string
          nullable: true
        time_zone:
          type: string
          nullable: true
        default:
          type: boolean
        is_default:
          type: boolean
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````