---
title: "Update External Law Firm Representation"
url: "https://developer.pexa.co.uk/apis/workspace-v1-v1/versions/32819e5a-6411-493b-abe8-00b7c7ca6c77/operations/updatePartyRepresentation"
---

> Full API specification: https://developer.pexa.co.uk/apis/workspace-v1-v1/versions/32819e5a-6411-493b-abe8-00b7c7ca6c77.md

# Update External Law Firm Representation

`PATCH` `/partner/api/platformconnect/v1/workspaces/{workspace_id}/representation/{representation_id}`

Operation ID: `updatePartyRepresentation`

Update external law firm representation details (name and address only)

## Path parameters

- `workspace_id` (string, uuid, required) - Workspace id
- `representation_id` (string, uuid, required)

## Header parameters

- `X-Request-Correlation-Id` (string, optional)

## Request body (required)

Content types: `application/json`

## Responses

- `200` - OK
- `400` - BAD REQUEST
- `401` - UNAUTHORIZED
- `403` - FORBIDDEN
- `404` - NOT FOUND
- `500` - INTERNAL SERVER ERROR
- `503` - SERVICE UNAVAILABLE

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Workspace
  version: v1.3.0
servers:
  - url: https://api.pexa.co.uk
    description: API Gateway URL
paths:
  /partner/api/platformconnect/v1/workspaces/{workspace_id}/representation/{representation_id}:
    patch:
      tags:
        - PartyRepresentation
      summary: Update External Law Firm Representation
      description: Update external law firm representation details (name and address only)
      operationId: updatePartyRepresentation
      security:
        - oauth2:
            - x-api:edit:external_law_firm_details
            - edit:external_law_firm_details
            - edit:law_firm_reference
      parameters:
        - in: header
          name: X-Request-Correlation-Id
          schema:
            type: string
            description: The unique identifier for the request
        - name: workspace_id
          in: path
          description: Workspace id
          required: true
          schema:
            type: string
            format: uuid
        - name: representation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - address
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 160
                  description: Updated external law firm name
                address:
                  type: object
                  required:
                    - postcode
                  properties:
                    name:
                      maxLength: 50
                      minLength: 0
                      type: string
                      example: 1 The House
                    number:
                      maxLength: 4
                      minLength: 0
                      type: string
                      example: 123a
                    flat:
                      maxLength: 30
                      minLength: 0
                      type: string
                      example: Flat 32
                    street:
                      maxLength: 60
                      minLength: 0
                      type: string
                      example: Huddersfield
                    town:
                      maxLength: 30
                      minLength: 0
                      type: string
                      example: West Yorkshire
                    postcode:
                      maxLength: 8
                      minLength: 6
                      type: string
                      example: M16 0RA
                      pattern: ^(([Gg][Ii][Rr]
                        0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s[0-9][A-Za-z]{2}))$
            examples:
              UpdateExternalLawFirm:
                value:
                  name: Updated Law Firm Ltd
                  address:
                    street: New Street
                    town: Manchester
                    postcode: M1 2AA
                summary: Update External Law Firm Details
        required: true
      responses:
        "200":
          description: OK
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  representationId:
                    type: string
                    format: uuid
                    description: Unique identifier for the representation
                  partyId:
                    type: string
                    format: uuid
                    description: The party identifier
                  representedBy:
                    type: string
                    description: Type of representation
                  subscriberId:
                    type: string
                    format: uuid
                    description: PEXA subscriber ID (for PEXA subscriber representations)
                  externalLawFirm:
                    type: object
                    required:
                      - name
                      - address
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 160
                        description: External law firm name
                      address:
                        type: object
                        required:
                          - postcode
                        properties:
                          name:
                            maxLength: 50
                            minLength: 0
                            type: string
                            example: 1 The House
                          number:
                            maxLength: 4
                            minLength: 0
                            type: string
                            example: 123a
                          flat:
                            maxLength: 30
                            minLength: 0
                            type: string
                            example: Flat 32
                          street:
                            maxLength: 60
                            minLength: 0
                            type: string
                            example: Huddersfield
                          town:
                            maxLength: 30
                            minLength: 0
                            type: string
                            example: West Yorkshire
                          postcode:
                            maxLength: 8
                            minLength: 6
                            type: string
                            example: M16 0RA
                            pattern: ^(([Gg][Ii][Rr]
                              0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s[0-9][A-Za-z]{2}))$
                  referenceNumber:
                    type: string
                    description: Reference number (for external law firms)
                  verificationOfIdentity:
                    type: string
                    pattern: ^(LAW_FIRM_CERTIFIED|IDENTITY_EVIDENCE)$
                    example: LAW_FIRM_CERTIFIED
                    description: >
                      Allowed values: [`LAW_FIRM_CERTIFIED`, `IDENTITY_EVIDENCE`]
        "400":
          description: BAD REQUEST
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
        "401":
          description: UNAUTHORIZED
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
        "403":
          description: FORBIDDEN
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
        "404":
          description: NOT FOUND
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
        "500":
          description: INTERNAL SERVER ERROR
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
        "503":
          description: SERVICE UNAVAILABLE
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              example:
                errors:
                  - message: Service under maintenance
security:
  - oauth2:
      - x-api:edit:external_law_firm_details
      - edit:external_law_firm_details
      - edit:law_firm_reference
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://login.pexauk.co.uk/oauth/token
          scopes:
            x-api:create:purchase_workspaces: Permission to create purchase workspace
            x-api:create:remortgage_workspaces: Permission to create remortgage workspace
            x-api:cancel:workspaces: Permission to cancel the workspace
            add:law_firm_reference: add law firm reference
            add:legal_representation_details: add legal representation details
            view:workspaces: view workspace
            create:title_change_request: create title change request
            edit:workspace_parties: edit workspace parties
            x-api:add:legal_representation_details: Permission to add party representation
            x-api:edit:external_law_firm_details: Permission to update external law firm representation
            create:workspaces: Permission to create workspaces
            edit:workspaces: Permission to edit workspaces
            edit:lodgement_proprietors: Permission to edit proprietors linked to lodgement case
            view:lodgement_proprietors: Permission to view proprietors linked to lodgement case
            add:workspace_participants: Permission to add workspace participants
            edit:external_law_firm_details: Permission to edit external law firm details
            edit:law_firm_reference: Permission to edit law firm reference
```
