Skip to main content

Customer Email Matching

Use this endpoint to check which of your customers are existing OpenSolar users. This endpoint allows you to retrieve Organization details by submitting one or more email addresses to be compared against the OpenSolar customer database.


Authentication​

Requests must include a bearer token in the HTTP Authorization header.


Endpoint​

MethodEndpointDescription
POST/api/orgs/:org_id/distributors/orgs_by_emails/Get Organization IDs & Organization names by email
  • :org_id: your OpenSolar Organization ID

Email Matching Request​

Send a JSON payload with an emails array:

Request Body​

{
"emails": [
"susan.rays@solartest.com",
"jane@solar4life.com"
]
}

API Responses​

Successful Response​

Status Code: 200 OK

Body:

{
"results": [
{
"email": "susan.rays@solartest.com",
"orgs": [
{
"org_id": 12345,
"org_name": "Solar Test"
}
]
},
{
"email": "jane@solar4life.com",
"orgs": [
{
"org_id": 13913,
"org_name": "Solar 4 Life"
},
{
"org_id": 284523,
"org_name": "Solar Test"
}
]
}
]
}

Note: Some user accounts are associated with more than one Organization. In these cases, we will return all associated Organization details.


Error Responses​

400 Bad Request

Returned when the request is malformed or missing required fields.

Example Response (Missing or Empty Email List):

{
"emails": ["This field is required."]
}