# Update Customer Data

Updates details for a given Customer, including contact information and Trusted Contact information. This endpoint can also be used to close customer accounts with the CloseCustomerAccount request body schema. Before closing a customer's account, all customer Pockets must have a zero balance.

NOTE: Update Customer Data isn’t available by default and must be enabled — please contact your Jiko point of contact to learn more.

Endpoint: PATCH /api/v1/customers/{customer_id}/
Version: Version: 2edadba5
Security: HTTPBearer

## Path parameters:

  - `customer_id` (string, required)

## Header parameters:

  - `x-jiko-idempotency` (string, required)

  - `x-jiko-signature` (string, required)

## Request fields (application/json):

  - `body` (CloseCustomerAccount (object) or UpdateCustomerData (object), required) — one of:
    - CloseCustomerAccount:
      - `status` (string, required)
      - `closure_reason` (string, required)
        Enum: "SUSPICIOUS_ACTIVITY", "USER_INSTIGATED", "PARTNER_INITIATED_CLOSURE", "INACTIVITY"
      - `closure_description` (any)
    - UpdateCustomerData:
      - `email` (any)
      - `phone_number` (any)
        Applicant's phone number. Note: It will be required to include country codes in accordance to the E.164 spec in a future release, or ^\+[1-9]\d{1,14}$.
      - `address` (any)
        - `street_address` (string, required)
          Street address
        - `street_address2` (any)
          Apartment, Suite, Box number, etc.
        - `city` (string, required)
          City / Town
        - `postal_code` (string, required)
          Postal code / ZIP code
        - `state` (any)
          State (Postal Abbreviations. Example: "AL", "NJ", "OH")
        - `country` (string, required)
          A ISO-3166 Alpha-2 country code (Abbreviated. Example: "US")
      - `trusted_contact` (any)
        Set the trusted contact as null to remove the current trusted contact information.
        - `first_name` (any)
        - `last_name` (any)
        - `email` (any)
        - `phone_number` (any)
          An E.164-formatted phone number, e.g. +12345678901
        - `address` (any)
          The address of the trusted contact. You can use a format such as {street name}, {city}, {state}, {post code}, {country}

## Response 200 fields (application/json):

  - `body` (any) — one of (discriminator: type):
    - BUSINESS:
      - `address` (object, required)
      - `address.street_address` (string, required)
        Street address
      - `address.street_address2` (any)
        Apartment, Suite, Box number, etc.
      - `address.city` (string, required)
        City / Town
      - `address.postal_code` (string, required)
        Postal code / ZIP code
      - `address.state` (any)
        State (Postal Abbreviations. Example: "AL", "NJ", "OH")
      - `address.country` (string, required)
        A ISO-3166 Alpha-2 country code (Abbreviated. Example: "US")
      - `email` (string, required)
      - `phone_number` (string, required)
      - `account_status` (string, required)
        Enum: "OPEN", "CLOSED", "FROZEN", "PENDING"
      - `type` (string, required)
      - `name` (string, required)
      - `identification_number` (object, required)
      - `identification_number.identification_number` (string, required)
      - `identification_number.issuing_country` (any)
        A ISO-3166 Alpha-2 country code (Abbreviated. Example: "US")
      - `identification_number.type` (string, required)
        Enum: "TIN", "EIN", "NON_US_BUSINESS_ID"
    - INDIVIDUAL:
      - `address` (object, required)
      - `address.street_address` (string, required)
        Street address
      - `address.street_address2` (any)
        Apartment, Suite, Box number, etc.
      - `address.city` (string, required)
        City / Town
      - `address.postal_code` (string, required)
        Postal code / ZIP code
      - `address.state` (any)
        State (Postal Abbreviations. Example: "AL", "NJ", "OH")
      - `address.country` (string, required)
        A ISO-3166 Alpha-2 country code (Abbreviated. Example: "US")
      - `email` (string, required)
      - `phone_number` (string, required)
      - `account_status` (string, required)
        Enum: same as `account_status` in "BUSINESS" (4 values)
      - `type` (string, required)
      - `name` (object, required)
      - `name.first_name` (string, required)
        First Name
      - `name.middle_name` (any)
        Middle Name
      - `name.last_name` (string, required)
        Last Name
      - `date_of_birth` (string, required)
      - `identification_number` (object, required)
      - `identification_number.identification_number` (string, required)
      - `identification_number.issuing_country` (any)
        A ISO-3166 Alpha-2 country code (Abbreviated. Example: "US")
      - `identification_number.identification_type` (string, required)
        Enum: "SSN", "PASSPORT", "NON_US_ID", "DRIVERS_LICENSE"
      - `trusted_contact` (any)
        - `first_name` (any)
        - `last_name` (any)
        - `email` (any)
        - `phone_number` (any)
          An E.164-formatted phone number, e.g. +12345678901
        - `address` (any)
          The address of the trusted contact. You can use a format such as {street name}, {city}, {state}, {post code}, {country}

## Response 409 fields (application/json):

  - `type` (string, required)

  - `instance` (string, required)

  - `detail` (string, required)

  - `trace_id` (any)


## Response 404 fields
