# Change the primary customer of an appointment

**POST /appointments/{id}/_actions/change-primary-customer**

Change the primary customer of an appointment. Only available to admins and service accounts. Changing the primary customer does not invalidate existing access tokens or access links associated with the previous primary customer record. This operation assumes that the reassignment refers to the same natural person and is performed solely for administrative or tracking purposes. No communication is triggered by this operation. Subsequent communications and reminders will use the updated primary customer record.


## Servers
- https://api.development.pexipengage.com/enterprises/acme: https://api.development.pexipengage.com/enterprises/acme ()


## Authentication methods
- O auth2


## Parameters
### Headers

- **Authorization** (string)
  Bearer token used for authorization

- **X-Correlation-Id** (string)
  Unique identifier to allow referencing a particular transaction or event chain

- **Accept-Language** (string)
  Returns the requested resources translated according to the passed languages (see [translatable resources](../topic/topic-languages-translations\#topic-translatable-resources))


### Path parameters

- **id** (string)
  Primary identifier of the requested resource



### Body: application/json (object)

- **newPrimaryCustomerId** (string)



## Responses
### 200
Successful operation

#### Body: application/json (object)
- **data** (object)


### 404
Resource not found

#### Body: application/json (object)
- **errors** (array[object])


### 422
Business validation failed

* `APPOINTMENT_PRIMARY_CUSTOMER_REPLACED_WITH_SELF`
* `APPOINTMENT_SECONDARY_CUSTOMER_PROMOTED_TO_PRIMARY`

See [Error codes](#topic-error-codes)

#### Body: application/json (object)
- **errors** (array[object])



[Powered by Bump.sh](https://bump.sh)
