Edit Customer

Overview

Use this API to modify an existing individual, corporate and group customer.

If actor is user or client application, this API allows:

  • Modify the existing contacts and contact points of the customer.
  • Add new contacts for the customer. This is applicable only for group and corporate customers.
  • Add new contact points for the customer.

If actor is customer, this API allows:

  • Edit profile for self.
  • Add new contact points, like email, phone, etc for self.
  • Modify the existing contact points for self.
    Note: Deletion of existing contact points is not allowed.

    Permissions

    Actor Permission
    User All of the following are required:
    • User must have 'Edit Customer' action.
    • If "Customer departmentalization" setting is enabled in the application, then the customer being modified must belong to either the user's home department, or to the department where the user is a foreign user.
    • If preferred agent of the customer has to be modified:
      • User must have view permission on the target preferred agent.
      • If "Customer departmentalization" setting is enabled in the application, the department of the customer must either be the home department of the target preferred agent or the target preferred agent must be a foreign user in the customer's department.
    Client Application If preferred agent of the customer has to be modified and "Customer departmentalization" setting is enabled in the application, then the department of the customer must either be the home department of the target preferred agent or the target preferred agent must be a foreign user in the customer's department.
    Customer All authenticated customers can access this API.
SecurityoAuthUser or oAuthClient or oAuthCustomer
Request
path Parameters
customerType
required
string

Customer Types

Enum: "individual" "corp" "group"
header Parameters
Accept
required
string
Default: application/json

Content type accepted by client.

Enum: "application/json" "application/xml"
Content-Type
required
string
Default: application/json

Media type sent by the client.

Enum: "application/json" "application/xml" "application/x-www-form-urlencoded" "multipart/form-data" "text/plain"
Accept-Language
required
string
Default: en-US

Language locale accepted by client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
Request Body schema: application/json

The request body is mandatory. Request body can be in either XML or JSON format.

Elements required in request body

Actor Name Description
User/Client Application id ID of the customer.
lastModified Last modified date of the customer.
Customer contacts.contact Contact details of customer to be modified. This has the details to be edited. At least one of the child attribute must be present. For required and optional elements of contact, refer Editable Attributes of a Contact.

Optional elements allowed in request body

NOTE:

  1. When actor is customer, no optional attribute is allowed.
  2. To remove value of any element of type "String", set the value to an empty string.
Name Description Customer Type
level Level of the customer. Must be one of the values configured in application.
  • Individual
  • Group
  • Corporate
role.value Role of the customer.
  • Individual
  • Group
  • Corporate
pin Customer pin information.
  • Individual
  • Group
  • Corporate
howReferred.value Specifies how the customer was referred
  • Individual
  • Group
  • Corporate
industry.value Industry that this customer belongs to. Must match the value configured in application.
  • Individual
  • Group
  • Corporate
marketSegment Market segment of the customer
  • Individual
  • Group
  • Corporate
preferredAgent.user.id Preffered agent of customer. Must match the ID of a user in application.
  • Individual
  • Group
  • Corporate
entitlements Entitlements of the customer.
  • Individual
  • Group
  • Corporate
customAttributes Name must match one of the custom attributes configured in application. If the custom attribute is configured as an enumeration, the value must be one of the predefined values.For string type of custom attribute that is not configured as an enumeration, refer list of Allowed Characters For Custom Attributes.
  • Individual
  • Group
  • Corporate
contacts.contact Individual customer can have a single contact, so only editing of existing contact is allowed. For group and corporate customer one or more contacts can be provided.
  • For required and optional elements to add a new contact, refer create contact.
  • For required and optional elements to edit an existing contact, refer edit contact.
  • Individual
  • Group
  • Corporate
customerName Name of the customer.
  • Group
  • Corporate
type.group.type.value Type of group of the customer. Must be one of the values configured in application.
  • Group
type.group.region Region of operation of the group customer
  • Group
type.group.numberOfMembers Number of members in the group
  • Group
type.group.income Income of the group customer
  • Group
type.group.currency Currency used while dealing with the group customer
  • Group
type.group.registrationNumber Registration number of the group customer
  • Group
type.group.affiliation Affiliation of the group customer
  • Group
type.corporate.region Region of operation of corporate customer. Must be one of the values configured in application.
  • Corporate
type.corporate.numberOfEmployees Number of employees in the organization
  • Corporate
type.corporate.revenues Revenue of the corporate customer
  • Corporate
type.corporate.currency Currency used while dealing with the corporate customer
  • Corporate
type.corporate.registrationNumber Registration number of the corporate customer
  • Corporate
type.corporate.sector Sector of the corporate customer
  • Corporate
Array of objects (link) >= 0 items

self link

object (cases)

Link to fetch cases of the requested customer.

customerName
string (customerName)

Name of the customer

object (department)

ID and name of the department

object (type)

Type and type-specific details of the customer

object (group)

Details specific to group customer

object (corporate)

Details specific to corporate customer

object (level)

Level of the customer

object (preferredAgent)

ID and name of the preffered agent for the requested customer

object (role)

Internal value and display value of the role of the customer

pin
string (pin)

Customer pin information

object (howReferred)

Specifies how the customer was referred

created
string <date-time> (created)

Customer creation Date and Time details.

object (createdBy)

Details of user who created customer.

lastModified
string <date-time> (lastModified)

Customer last modified Date and Time details.

object (lastModifiedBy)

Details of user who modified customer.

object (industry)

Industry that this customer belongs to.

marketSegment
string (marketSegment)

Market segment of the customer.

entitlements
string (entitlements)

Entitlements of the customer.

object (CustomAttributes)

Name and value of all the custom attributes configured for the Customer Object

object (contacts)

Details of all contacts associated with the requested customer

Array of objects (notes) >= 0 items

Link to retrieve all notes of the customer

id
string (id)

Customer ID

Responses
204

No content

400

Bad Request

401

Unauthorized

403

Forbidden

406

Not Acceptable

500

Internal server error

patch/{customerType}/customer
Request samples
application/json
  • PATCH /core/customermgr/v3/individual/customer
  • This example demonstrates the following:
    • Modifying all supported customer attributes (attributes outside the contact node) of an individual customer.
{
  • "id": "1004",
  • "lastModified": "2021-10-22T11:40:11.000Z",
  • "level": {
    },
  • "role": {
    },
  • "pin": "0121",
  • "howReferred": {
    },
  • "industry": {
    },
  • "marketSegment": "Medical Products",
  • "preferredAgent": {
    },
  • "entitlements": "",
  • "customAttributes": {
    }
}
Response samples
application/json
{
  • "code": "400-101",
  • "developerMessage": "Unsupported query parameter(s) supplied: '<query_parameter>'."
}