# 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: 8adbbb13
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer

## Path parameters:

  - `customer_id` (string, required)

## Header parameters:

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

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

## Request fields (application/json):

  - `status` (string, required)

  - `closure_reason` (string, required)
    Enum: "SUSPICIOUS_ACTIVITY", "USER_INSTIGATED", "PARTNER_INITIATED_CLOSURE", "INACTIVITY"

  - `closure_description` (any)

  - `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)

  - `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")

  - `trusted_contact` (any)
    Set the trusted contact as null to remove the current trusted contact information.

  - `trusted_contact.first_name` (any)

  - `trusted_contact.last_name` (any)

  - `trusted_contact.email` (any)

  - `trusted_contact.phone_number` (any)
    An E.164-formatted phone number, e.g. +12345678901

  - `trusted_contact.address` (any)
    The address of the trusted contact. You can use a format such as `{street name}, {city}, {state}, {post code}, {country}`

## Request examples:

  - `Customer data update request` (unknown)

  - `Customer account closure request` (unknown)
    The customer must not have funded pockets. All open and empty pockets will be closed. If the customer is already closed, or has funded pockets, an error will be returned.

## Response 200:

  - `200` (unknown)
    Successful Response

## Response 200 fields (application/json):

  - `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"

  - `date_of_birth` (string, required)

  - `trusted_contact` (any)

  - `trusted_contact.first_name` (any)

  - `trusted_contact.last_name` (any)

  - `trusted_contact.email` (any)

  - `trusted_contact.phone_number` (any)
    An E.164-formatted phone number, e.g. +12345678901

  - `trusted_contact.address` (any)
    The address of the trusted contact. You can use a format such as `{street name}, {city}, {state}, {post code}, {country}`

## Response 404:

  - `404` (unknown)
    Not found

## Response 409:

  - `409` (unknown)
    Conflict

## Response 409 fields (application/json):

  - `type` (string, required)

  - `instance` (string, required)

  - `detail` (string, required)

  - `trace_id` (any)

## Response 422:

  - `422` (unknown)
    Unprocessable Content

## Response 422 fields (application/json):

  - `type` (string, required)

  - `instance` (string, required)

  - `detail` (string, required)

  - `trace_id` (any)

## Response 200 examples:

  - `Updated customer response` (unknown)

  - `Closed customer response` (unknown)

