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

# Update customer location

> Partially update an existing location associated with the specified customer.



## OpenAPI

````yaml api-reference/schema.yaml patch /customers/{customer_pk}/locations/{location_pk}/
openapi: 3.0.3
info:
  title: ''
  version: 0.0.0
servers:
  - url: https://api.parceltracer.com/v1/external/
    description: Parcel Tracer api endpoint
security: []
paths:
  /customers/{customer_pk}/locations/{location_pk}/:
    patch:
      tags:
        - Customer Locations
      summary: Update customer location
      description: >-
        Partially update an existing location associated with the specified
        customer.
      operationId: update_customer_location
      parameters:
        - in: path
          name: customer_pk
          schema:
            type: integer
          required: true
        - in: path
          name: location_pk
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedExternalLocation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedExternalLocation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedExternalLocation'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalLocation'
              examples:
                LocationUpdatedSuccessfully:
                  value:
                    id: 9691
                    area:
                      id: 146
                      name_ar: عيناب
                      name_en: Ainab
                      district: Aley
                      lat: '33.766414000000000'
                      long: '35.546311000000000'
                    directions: ''
                  summary: Example of resource created successfully
          description: Successful update
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ValidationError:
                  value:
                    error: 'true'
                    message: Validation failed.
                    details: 'district: Beiruts is not a valid choice.'
                  summary: Example of validation error response
          description: Validation error
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                NotFoundError:
                  value:
                    error: 'true'
                    message: Resource not found.
                    details: 'detail: Not found.'
                  summary: Example of resource not found error
          description: Customer location not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ServerError:
                  value:
                    error: 'true'
                    message: Unexpected error.
                    details: Internal server error
                  summary: Example of internal server error response
          description: Server error
      security:
        - MerchantAPIKey: []
components:
  schemas:
    PatchedExternalLocation:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        area:
          $ref: '#/components/schemas/Area'
        directions:
          type: string
    ExternalLocation:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        area:
          $ref: '#/components/schemas/Area'
        directions:
          type: string
      required:
        - area
        - id
    ErrorResponse:
      type: object
      properties:
        error:
          type: boolean
        message:
          type: string
        details: {}
      required:
        - details
        - error
        - message
    Area:
      type: object
      description: |-
        A ModelSerializer that takes an additional `fields` argument that
        controls which fields should be displayed.
      properties:
        id:
          type: integer
          readOnly: true
        name_ar:
          type: string
          default: ''
          maxLength: 200
        name_en:
          type: string
          default: ''
          maxLength: 200
        district:
          $ref: '#/components/schemas/DistrictEnum'
        lat:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,15})?$
          nullable: true
        long:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,15})?$
          nullable: true
        maps_link:
          type: string
          nullable: true
          maxLength: 200
        code:
          type: string
          readOnly: true
      required:
        - code
        - id
    DistrictEnum:
      enum:
        - Zahleh
        - Hasbaya
        - Baalbek
        - Jezzine
        - Baabda
        - Jbeil
        - Zgharta
        - Bint Jbeil
        - Hermel
        - Marjeyoun
        - Bsharri
        - Aley
        - Rashaya
        - Miniyeh-Danniyeh
        - Tripoli
        - Tyre
        - Nabatieh
        - Chouf
        - Maatn
        - Western Beqaa
        - Akkar
        - Sidon
        - Batroun
        - Keserwan
        - Koura
        - Beirut
      type: string
      description: |-
        * `Zahleh` - Zahleh
        * `Hasbaya` - Hasbaya
        * `Baalbek` - Baalbek
        * `Jezzine` - Jezzine
        * `Baabda` - Baabda
        * `Jbeil` - Jbeil
        * `Zgharta` - Zgharta
        * `Bint Jbeil` - Bint Jbeil
        * `Hermel` - Hermel
        * `Marjeyoun` - Marjeyoun
        * `Bsharri` - Bsharri
        * `Aley` - Aley
        * `Rashaya` - Rashaya
        * `Miniyeh-Danniyeh` - Miniyeh-Danniyeh
        * `Tripoli` - Tripoli
        * `Tyre` - Tyre
        * `Nabatieh` - Nabatieh
        * `Chouf` - Chouf
        * `Maatn` - Maatn
        * `Western Beqaa` - Western Beqaa
        * `Akkar` - Akkar
        * `Sidon` - Sidon
        * `Batroun` - Batroun
        * `Keserwan` - Keserwan
        * `Koura` - Koura
        * `Beirut` - Beirut
  securitySchemes:
    MerchantAPIKey:
      type: apiKey
      in: header
      name: X-Api-Key

````