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

# Update Party

> Updates a Customer, Employee, or Vendor party's own fields. The optional `connectionGroups` array on `user` creates or updates Billing Accounts under this party as part of the same call. Archiving or restoring a party also goes through this endpoint, via `archiveStatus` — there is no separate archive endpoint.



## OpenAPI

````yaml POST /billspree/users/update-user
openapi: 3.1.0
info:
  title: Billspree API
  description: REST API for Billspree — billing, AR management, and workspace operations.
  version: 1.0.0
servers:
  - url: https://{workspace}.spreesuite.com
    variables:
      workspace:
        default: your-workspace
        description: Your organization's subdomain (e.g. demo → demo.spreesuite.com)
security:
  - apiKeyAuth: []
paths:
  /billspree/users/update-user:
    post:
      tags:
        - Parties
      summary: Update Party
      description: >-
        Updates a Customer, Employee, or Vendor party's own fields. The optional
        `connectionGroups` array on `user` creates or updates Billing Accounts
        under this party as part of the same call. Archiving or restoring a
        party also goes through this endpoint, via `archiveStatus` — there is no
        separate archive endpoint.
      operationId: updateParty
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
            example:
              user:
                partyID: 789
                partyNumber: 789
                name: Jane Doe
                email: jane@example.com
                connectionGroups:
                  - connectionGroupLabel: BA-001
              method: Update
              action: Update Parties
              apiVersion: v2
      responses:
        '200':
          description: Party updated, or a validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePartyResponse'
              example:
                success: true
                statusCode: 200
                message: Request Succeeded.
                error: null
                data: {}
components:
  schemas:
    UpdateUserRequest:
      type: object
      required:
        - user
        - method
        - action
        - apiVersion
      properties:
        user:
          $ref: '#/components/schemas/PartyUpdatePayload'
        method:
          type: string
          example: Update
        action:
          type: string
          example: Update Parties
        apiVersion:
          type: string
          example: v2
    UpdatePartyResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
        message:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/ValidationMessageList'
        statusCode:
          type: integer
        error:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ValidationMessageList'
    PartyUpdatePayload:
      type: object
      properties:
        country:
          type: string
        email:
          type: string
        name:
          type: string
        cnic:
          type: string
        title:
          type: string
        shopNo:
          type: string
        additionalInfo:
          type: string
        buildingNo:
          type: string
        buildingName:
          type: string
        street:
          type: string
        block:
          type: string
        society:
          type: string
        city:
          type: string
        partyID:
          type: integer
        partyNumber:
          type: integer
        addressTs:
          type: integer
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        partyTypeID:
          type: integer
          nullable: true
        ntn:
          type: string
        particulars:
          type: object
          additionalProperties: true
        competencies:
          type: array
          items:
            type: object
        associationType:
          type: string
        archiveStatus:
          type: integer
          description: >-
            Also used to archive or restore a party through this same endpoint —
            there is no separate archive endpoint.
        dataSecurityAttributes:
          type: array
          items:
            type: object
        connectionGroups:
          type: array
          description: >-
            Optional. Creates or updates Billing Accounts under this party. Only
            connectionGroupLabel is required per entry — every other field is
            included only if it was provided.
          items:
            $ref: '#/components/schemas/ConnectionGroup'
        levelId:
          type: integer
        hierarchyId:
          type: integer
        parentID:
          type: integer
          description: Set to 0 only to clear the parent.
        parentPartyNumber:
          type: integer
    ValidationMessageList:
      type: array
      items:
        type: object
        properties:
          message:
            type: string
    Contact:
      type: object
      properties:
        contactType:
          type: string
          example: Mobile
        contactValue:
          type: string
    ConnectionGroup:
      type: object
      required:
        - connectionGroupLabel
      properties:
        connectionGroupLabel:
          type: string
          description: Required. Label identifying this billing account/connection group.
        type:
          type: string
        paymentMethod:
          type: string
        tariffLabel:
          type: string
          description: Pricing Module label to attach to this billing account.
        billingPeriodID:
          type: integer
        billingGroupID:
          type: integer
          nullable: true
        connAccountID:
          type: integer
        unsettledAccountID:
          type: integer
        connComponentAccountIDs:
          type: array
          items:
            type: integer
        address:
          type: object
          description: Optional address object for this billing account.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Auth token returned from the login endpoint. Send as: `Authorization:
        <token>` (no Bearer prefix)

````