Impersonation.FindContactByEmail

Try it in Swagger

Endpoint

Request Schema

Headers

Header Required Notes
Authorization Yes Bearer JWT from Auth/Token. The authenticated contact must match the configured MasterContactCode for the tenant.
X-Api-Key Yes Resolves the tenant and is required for this operation. ApiKey is also accepted by tenant middleware.

Query Parameters

Parameter Type Required Notes
email string Yes Email address to search in the resolved tenant customer database.

Request Sample

GET /impersonate/contacts?email=contact%40example.com
Authorization: Bearer {token}
X-Api-Key: {api-key}

Expected Response Schema

Status Codes

Status Notes
200 OK One or more contacts matched the email.
400 Bad Request Email was not provided.
401 Unauthorized Tenant/API key or bearer authentication failed.
403 Forbidden Master contact is not configured or the authenticated contact is not authorized.
404 Not Found No contact matched the email address.

Success Body

Response type: IReadOnlyList<ImpersonationContactResponse>

A single email can be shared across multiple customer locations, so the endpoint returns every matching contact. Each item includes the customer location details so callers can disambiguate before impersonating.

Field Type Required Max Length Notes
customerCode string Yes Customer code associated with the contact.
contactCode string Yes Matching contact code.
contact string Yes Matching contact display name.
email string Yes Matching contact email address.
location ImpersonationContactLocation No Customer location details for the match. null when the customer record cannot be resolved.

ImpersonationContactLocation

Field Type Required Max Length Notes
customerName string Yes Customer/location name.
branchCode integer Yes Branch code for the customer location.
address1 string Yes First address line.
address2 string Yes Second address line.
city string Yes City.
state string Yes State.
zip string Yes Postal/zip code.

Response Sample

[
  {
    "customerCode": "ABC001",
    "contactCode": "456",
    "contact": "Maria Contact",
    "email": "contact@example.com",
    "location": {
      "customerName": "Acme Legal - Downtown",
      "branchCode": 1,
      "address1": "100 Main St",
      "address2": "Suite 200",
      "city": "Los Angeles",
      "state": "CA",
      "zip": "90012"
    }
  },
  {
    "customerCode": "XYZ002",
    "contactCode": "789",
    "contact": "Maria Contact",
    "email": "contact@example.com",
    "location": {
      "customerName": "Acme Legal - Westside",
      "branchCode": 2,
      "address1": "55 Ocean Ave",
      "address2": "",
      "city": "Santa Monica",
      "state": "CA",
      "zip": "90401"
    }
  }
]