---
title: "aid_customers_cid_put"
method: PUT
path: "/accounts/{aid}/customers/users/{customer_id}"
tags: ["users"]
---

# aid_customers_cid_put

`PUT /accounts/{aid}/customers/users/{customer_id}`

Update customer properties, properties not included in the body
will remain unchanged.
scopes:
- admin:customers
- write:customers
- user:customers

## Path parameters

- `aid` string, ^[PT]{1}\d{8}$, required
- `customer_id` string, required

## Request body

- object
  - `first_name` string, nullable
  - `last_name` string, nullable
  - `email` string, nullable — customer email, case insensitive duplication control prevents multiple user with same `type` to have equal email customer@example.com is equal to CUStOMer@EXAMPLE.com
  - `phone_number` string, ^\+?[1-9]\d{1,14}$, nullable — A phone number in E.164 number formatting.
  - `attributes` object — Custom attributes
  - `status` string, nullable — Status of the customer
  - `favorite_store` string, nullable — customer favorite store
  - `enrolled_by` object — The source that recruited the customer
    - `type` string — Enrollment type, e.g. `url`, `store`, `qr_code`, any string
    - `value` string, nullable, required
  - `marketing_consent` object — Customers consent for marketing in different channels
    - `sms` UserConsent
      - `consent` boolean
      - `updated_at` string, date-time — The date-time when the resource was last updated:
    - `email` UserConsent
      - `consent` boolean
      - `updated_at` string, date-time — The date-time when the resource was last updated:
  - `type` 'customer' | 'company' | 'contact' | 'employee' | 'other' — Describe type of a user. - `company` property is required when using the type `company` - `company` property is only supported for users with type `other` or `company` - Creating or updating user with type `employee` or `other` requires `admin:customers` or `write:customers` scope. - User login is only available for users with type `customer` or `company`
  - `addresses` CustomerAddress[]
    - `address_line` string, required
    - `address_line_2` string
    - `postal_code` string
    - `postal_place` string, required
    - `country` string, iso-3166-1, required — ISO 3166-1 country code
    - `latitude` number
    - `longitude` number
    - `type` 'custom' | 'home' | 'other' | 'work' — The address type
    - `custom_type` string — If the address `type` is `custom`, this property contains the custom value
    - `comment` string — Comment about the address
  - `term` CustomerTerm
    - `id` string, uuid
    - `accepted_at` string, date-time
  - `company` object — Company details, supported when type is Company
    - `organization_number` string — Companys identification number
    - `bussiness_name` string, required
    - `department` string — companys department
    - `industry` string
    - `website` string
    - `number_of_employees` string
  - `gender` string, nullable
  - `date_of_birth` string, date, nullable
  - `contact_for` object[] — The users that it is a contact for, supported when type is `contact`
    - `customer_id` string, required — The customer id that it is a contact for
  - `password` string — The customer password. The caller must have scope `write:accounts:/auth/users` when password is included in the body
  - `pin` string — 6 digit customer pin, can only be used for MFA login. The caller must have scope `write:accounts:/auth/users` when pin is included in the body

## Response `200`

Customer updated

- CustomerResponse
  - `metadata` object — A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format. You can unset an individual key by setting its value to null and then saving. To clear all keys, set metadata to null
  - `id` string, uuid — An UUID that uniquely identifies the resource
  - `created_at` string, date-time — The date-time when the resource was created
  - `created_by` string — The ID of the user/client created the resource
  - `updated_at` string, date-time — The date-time when the resource was last updated
  - `deleted_by` string — The ID of the user/client created the resource
  - `deleted_at` string, date-time
  - `first_name` string, nullable
  - `last_name` string, nullable
  - `email` string, nullable — customer email, case insensitive duplication control prevents multiple user with same `type` to have equal email customer@example.com is equal to CUStOMer@EXAMPLE.com
  - `phone_number` string, ^\+?[1-9]\d{1,14}$, nullable — A phone number in E.164 number formatting.
  - `attributes` object — Custom attributes
  - `status` string, nullable — Status of the customer
  - `favorite_store` string, nullable — customer favorite store
  - `enrolled_by` object — The source that recruited the customer
    - `type` string — Enrollment type, e.g. `url`, `store`, `qr_code`, any string
    - `value` string, nullable, required
  - `marketing_consent` object — Customers consent for marketing in different channels
    - `sms` UserConsent
      - `consent` boolean
      - `updated_at` string, date-time — The date-time when the resource was last updated:
    - `email` UserConsent
      - `consent` boolean
      - `updated_at` string, date-time — The date-time when the resource was last updated:
  - `type` 'customer' | 'company' | 'contact' | 'employee' | 'other', required — Describe type of a user. - `company` property is required when using the type `company` - `company` property is only supported for users with type `other` or `company` - Creating or updating user with type `employee` or `other` requires `admin:customers` or `write:customers` scope. - User login is only available for users with type `customer` or `company`
  - `addresses` CustomerAddress[]
    - `address_line` string, required
    - `address_line_2` string
    - `postal_code` string
    - `postal_place` string, required
    - `country` string, iso-3166-1, required — ISO 3166-1 country code
    - `latitude` number
    - `longitude` number
    - `type` 'custom' | 'home' | 'other' | 'work' — The address type
    - `custom_type` string — If the address `type` is `custom`, this property contains the custom value
    - `comment` string — Comment about the address
  - `term` CustomerTerm
    - `id` string, uuid
    - `accepted_at` string, date-time
  - `company` object — Company details, supported when type is Company
    - `organization_number` string — Companys identification number
    - `bussiness_name` string, required
    - `department` string — companys department
    - `industry` string
    - `website` string
    - `number_of_employees` string
  - `gender` string, nullable
  - `date_of_birth` string, date, nullable
  - `contact_for` object[] — The users that it is a contact for, supported when type is `contact`
    - `customer_id` string, required — The customer id that it is a contact for
  - `customer_id` string, required — The customer id you have defined for the customer. (must not have trailing or leading spaces) An auto-generated customer_id will be created if no customer_id is provided.

## Other responses

- `400` — Bad / Invalid request
- `401` — Access forbidden, invalid JWT token was used
- `403` — Forbidden
- `404` — Resource was not found
- `500` — Unexpected Error

---

[API](https://skmtc.net/dintero/apis/account-management-api.md) · [All operations](https://skmtc.net/dintero/apis/account-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dintero/account-management-api/revisions/9b83a4199008/schema)
