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

# Update customer by ID

```jsonc Body raw (json) wrap expandable theme={null}
{
    "first_name", // optional | string | max:255
    "last_name", // optional | string | max:255
    "display_name", // optional | string | required, if first_name and last_name are not provided or empty and should be unique | max:255
    "email", // optional | string | email | max:255
    "phone", // optional | string | max:255 | description: should be valid phone number
    "notes", // optional | string | max:7500
    "has_different_billing_address", // optional | boolean | acceptable_values: true,false
    "status", // optional | string | acceptable_values: lead,opportunity,current customer,lost,other,inactive
    "company_name", // optional | string | max:255
    "alt_email", // optional | string | email | max:255
    "billing_address_1", // optional | string | max:1000
    "billing_address_2", // optional | string | max:1000
    "billing_city", // optional | string | max:255
    "billing_state", // optional | string | max:255
    "billing_zip_code", // optional | string | max:255
    "assigned_to", // nullable | integer | description: the id of user whom assigned the customer
    "secondary_email", // optional | string | email | max:255
    "secondary_phone", // optional | string | max:255 | description: should be valid phone number
    "service_address_1", // optional | string | max:255
    "service_address_2", // optional | string | max:255
    "service_address_city", // optional | string | max:255
    "service_address_state", // optional | string | max:255
    "service_address_zip_code", // optional | string | max:255
    "job_notes", // optional | string | max:4000
    "customfields": [ // optional | array | description: array of custom fleds
        {
            "id", // optional | nullable | required if field_instance_id is not set | integer | custom field id
            "field_instance_id", // optional | nullable | required if id is not set | integer | custom field instance id
            "value" // required | string | custom value
        },
        {
            "id", // optional | nullable | required if field_instance_id is not set | integer | custom field id
            "field_instance_id", // optional | nullable | required if id is not set | integer | custom field instance id
            "value" // required | string | custom value
        }
    ],
    "locations": [ // optional | array | description: array for creating customer location(s)
        {
            "object_type",  // required | string | description: indicate the location object type. Mostly customer
            "object_id",  // required | integer | description: indicate the location object id. Mostly customer id
            "title", // required | string | max_length:255
            "address_1", // nullable | string | max_length:255
            "address_2", // nullable | string | max_length:255
            "city", // nullable | string | max_length:255
            "state", // nullable | string | max_length:255
            "zip_code", // nullable | string | max_length:255
            "is_main_location" // optional | boolean | acceptable_values: true,false | description: indicate if the location is main. This will be shown in the page
        },
        {
            "object_type",  // required | string | description: indicate the location object type. Mostly customer
            "object_id",  // required | integer | description: indicate the location object id. Mostly customer id
            "title", // required | string | max_length:255
            "address_1", // nullable | string | max_length:255
            "address_2", // nullable | string | max_length:255
            "city", // nullable | string | max_length:255
            "state", // nullable | string | max_length:255
            "zip_code", // nullable | string | max_length:255
            "is_main_location" // optional | boolean | acceptable_values: true,false | description: indicate if the location is main. This will be shown in the page
        }
    ],
    "account_type", // optional | string |  acceptable_values: individual,company | description: indicate customer type
    "pipeline_status_id", // optional | integer | description: Existing pipeline status id
    "lead_source_id", // optional | integer | description: Existing lead source id
    "tags", // optional | array | description: array of existing customer tag ids
    "notify_self_assigned" // optional | nullable | boolean | description: when true, the assignee is notified even if they are the user making the request
}
```


## OpenAPI

````yaml put /customers/{customerId}
openapi: 3.0.0
info:
  title: FieldPulse API
  description: >-
    REST API for the FieldPulse field service management platform.


    **Authentication:** All requests require an `x-api-key` header. Contact
    support@fieldpulse.com to obtain your API key.


    **Important:** The API Playground below makes live requests against your
    production data. Use caution when testing write operations (POST, PUT,
    DELETE).
  version: 1.0.0
servers:
  - url: https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Assets
    description: Endpoints related to assets
  - name: Assets Category
    description: Endpoints related to assets category
  - name: Comments
    description: Endpoints related to comments
  - name: Company Profile
    description: Endpoints related to contracts
  - name: Contracts
    description: Endpoints related to contracts
  - name: Customers
    description: Endpoints related to customers
  - name: Custom Fields
    description: Endpoints related to custom fields
  - name: Estimates
    description: Endpoints related to estimates
  - name: Invoices
  - name: Items
  - name: Jobs
  - name: Lead Source
  - name: Locations
  - name: Material Lists
  - name: Payments
  - name: Pipeline Status
  - name: Projects
  - name: Purchase Orders
  - name: Subtasks
  - name: Tags
  - name: Teams
  - name: Timesheets
  - name: Users
  - name: Vendors
  - name: Version
paths:
  /customers/{customerId}:
    put:
      tags:
        - Customers
      summary: Update customer by ID
      operationId: putCustomersByCustomerId
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  maxLength: 255
                last_name:
                  type: string
                  maxLength: 255
                display_name:
                  type: string
                  maxLength: 255
                  description: >-
                    Required if first_name and last_name are not provided or
                    empty and should be unique.
                email:
                  type: string
                  format: email
                  maxLength: 255
                phone:
                  type: string
                  maxLength: 255
                  description: Should be valid phone number.
                notes:
                  type: string
                  maxLength: 7500
                has_different_billing_address:
                  type: boolean
                status:
                  type: string
                  enum:
                    - lead
                    - opportunity
                    - current customer
                    - lost
                    - other
                    - inactive
                company_name:
                  type: string
                  maxLength: 255
                alt_email:
                  type: string
                  format: email
                  maxLength: 255
                billing_address_1:
                  type: string
                  maxLength: 1000
                billing_address_2:
                  type: string
                  maxLength: 1000
                billing_city:
                  type: string
                  maxLength: 255
                billing_state:
                  type: string
                  maxLength: 255
                billing_zip_code:
                  type: string
                  maxLength: 255
                assigned_to:
                  type: integer
                  nullable: true
                  description: The id of user whom assigned the customer.
                secondary_email:
                  type: string
                  format: email
                  maxLength: 255
                secondary_phone:
                  type: string
                  maxLength: 255
                  description: Should be valid phone number.
                service_address_1:
                  type: string
                  maxLength: 255
                service_address_2:
                  type: string
                  maxLength: 255
                service_address_city:
                  type: string
                  maxLength: 255
                service_address_state:
                  type: string
                  maxLength: 255
                service_address_zip_code:
                  type: string
                  maxLength: 255
                job_notes:
                  type: string
                  maxLength: 4000
                customfields:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        nullable: true
                        description: >-
                          Required if field_instance_id is not set. Custom field
                          id.
                      field_instance_id:
                        type: integer
                        nullable: true
                        description: Required if id is not set. Custom field instance id.
                      value:
                        type: string
                        description: Custom value.
                    required:
                      - value
                  description: Array of custom fields.
                locations:
                  type: array
                  items:
                    type: object
                    properties:
                      object_type:
                        type: string
                        description: Indicate the location object type. Mostly customer.
                      object_id:
                        type: integer
                        description: Indicate the location object id. Mostly customer id.
                      title:
                        type: string
                        maxLength: 255
                      address_1:
                        type: string
                        nullable: true
                        maxLength: 255
                      address_2:
                        type: string
                        nullable: true
                        maxLength: 255
                      city:
                        type: string
                        nullable: true
                        maxLength: 255
                      state:
                        type: string
                        nullable: true
                        maxLength: 255
                      zip_code:
                        type: string
                        nullable: true
                        maxLength: 255
                      is_main_location:
                        type: boolean
                        description: >-
                          Indicate if the location is main. This will be shown
                          in the page.
                    required:
                      - object_type
                      - object_id
                      - title
                  description: Array for creating customer location(s).
                account_type:
                  type: string
                  enum:
                    - individual
                    - company
                  description: Indicate customer type.
                pipeline_status_id:
                  type: integer
                  description: Existing pipeline status id.
                lead_source_id:
                  type: integer
                  description: Existing lead source id.
                tags:
                  type: array
                  items:
                    type: integer
                  description: Array of existing customer tag ids.
                notify_self_assigned:
                  type: boolean
                  nullable: true
                  description: >-
                    When true, the assignee is notified even if they are the
                    user making the request.
            example:
              first_name: some string
              last_name: some string
              display_name: some string
              email: user@example.com
              phone: '+12345678'
              notes: some string
              has_different_billing_address: true
              status: lead
              company_name: some string
              alt_email: user@example.com
              billing_address_1: some string
              billing_address_2: some string
              billing_city: some string
              billing_state: some string
              billing_zip_code: some string
              assigned_to: 1
              secondary_email: user@example.com
              secondary_phone: '+12345678'
              service_address_1: some string
              service_address_2: some string
              service_address_city: some string
              service_address_state: some string
              service_address_zip_code: some string
              job_notes: some string
              customfields:
                - id: 1
                  field_instance_id: 1
                  value: some string
                - id: 1
                  field_instance_id: 1
                  value: some string
              locations:
                - object_type: some string
                  object_id: 1
                  title: some string
                  address_1: some string
                  address_2: some string
                  city: some string
                  state: some string
                  zip_code: some string
                  is_main_location: true
                - object_type: some string
                  object_id: 1
                  title: some string
                  address_1: some string
                  address_2: some string
                  city: some string
                  state: some string
                  zip_code: some string
                  is_main_location: true
              account_type: individual
              pipeline_status_id: 1
              lead_source_id: 1
              tags:
                - 1
              notify_self_assigned: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: false when the request succeeds.
                    example: false
                  response:
                    type: object
                    description: The updated record.
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                error: true
                errors:
                  - error message
                  - error message
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Request URL or object not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

## Related topics

- [Material Lists Overview](/inventory-materials/material-lists/material-lists.md)
- [Offline Mode Overview](/troubleshooting/offline-mode/offline-mode.md)
- [Setting Up Caller ID](/add-ons/engage/caller-id.md)
- [How to Create Asset Reports](/reporting/raw-data/asset-reports.md)
- [Material Lists Offline Mode Details](/inventory-materials/material-lists/offline-behavior.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.