# Edit EmailAddress

Note that you cannot change the Organization that a person belongs to as this is determined automatically by TonicDM.
To delete an EmailAddress, PATCH its status to `inactive` or `deleted` (soft deleted).

Endpoint: POST /core/emailaddresses/update
Version: 0.0.5
Security: OAuth2

## Request fields (application/json):

  - `locationId` (string)
    Example: 8e8aa42241794371ae9d0ed7b67a8c86

  - `disciplines` (array)
    The UUIDs of the Disciplines this Person is typically involved in.

  - `certifications` (array)
    Zero or more certifications that this Person has obtained, or previously obtained. REQUIRES the TonicDM AdvancedContacts license.

## Response 200 fields (application/json):

  - `status` (string, required)
    Enum: "success"

  - `data` (array, required)

  - `data.location` (object)
    The physical location (office) that is assigned to a Project or Person. 
This allows for filtering by Location, and the calcuation of metrics by Location.
Use of this feature for Contact Organizations requires the TonicDM AdvancedContacts license.

  - `data.location.id` (string)
    Example: 8e8aa42241794371ae9d0ed7b67a8c86

  - `data.location.datetimeCreated` (string)
    The date and time this Location was created.

  - `data.location.datetimeUpdated` (string)
    The date and time this Location was last updated.

  - `data.location.status` (string)
    Whether the item is active or inactive in TonicDM. Potentially the item could be (soft) deleted.
    Enum: "active", "inactive", "deleted"

  - `data.location.name` (string)
    The name given to this Location. It is used in the TonicDM app only (not put onto anything externally facing).

  - `data.location.address` (string)
    The address of the location. Use `\n` for new lines when submitting (they will be returned as `<br>`).

  - `data.location.phoneCountryCode` (string)
    Numbers only, no spaces or `+` character

  - `data.location.phoneNumber` (string)
    Numbers only, no spaces or formatting

  - `data.location.customerDataWarehouseId` (string)
    The ID of the Person in the Customer's Data Warehouse.
FOR USE BY CUSTOMER. NOT YET IMPLEMENTED.
REQUIRES the TonicDM AdvancedMetrics license.

  - `data.location.customerErpId` (string)
    The ID of the Person in the Customer's ERP system (eg. Deltek Vantagepoint).
FOR USE BY CUSTOMER. NOT YET IMPLEMENTED.
REQUIRES the TonicDM AdvancedMetrics license.

  - `data.location.customerCrmId` (string)
    The ID of the Person in the Customer's CRM system (eg. Deltek Salesforce).
FOR USE BY CUSTOMER. NOT YET IMPLEMENTED.
REQUIRES the TonicDM AdvancedMetrics license.

  - `data.disciplines` (array)
    The UUIDs of the Disciplines this Person is typically involved in.

  - `data.disciplines.initials` (string)
    1-2 letter abbreviation

  - `data.disciplines.abbreviation` (string)
    4 letter abbreviation

  - `data.disciplines.name` (string)
    Unabbreviated discipline name

  - `data.certifications` (array)
    Zero or more certifications that this Person has obtained, or previously obtained. REQUIRES the TonicDM AdvancedContacts license.

  - `data.certifications.datetimeCreated` (string)
    The date and time this Certification record was created.

  - `data.certifications.datetimeUpdated` (string)
    The date and time this Certification record was last updated.

  - `data.certifications.certificationDefinitionId` (string, required)
    The UUID of the Certification Definition record.

  - `data.certifications.appliesToId` (string)
    The UUID of the record this Certification applies to.

  - `data.certifications.appliesToType` (string)
    The type of record this Certification applies to.
    Enum: "organization", "project", "person"

  - `data.certifications.dateExpires` (string)
    The date this certification expires.

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, `page` will be 1, `total_pages` will be 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 400 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, `page` will be 1, `total_pages` will be 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 401 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, `page` will be 1, `total_pages` will be 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 403 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, `page` will be 1, `total_pages` will be 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 404 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, `page` will be 1, `total_pages` will be 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 429 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, `page` will be 1, `total_pages` will be 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 500 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, `page` will be 1, `total_pages` will be 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

